diff --git a/drivers/net/can/m_can/tcan4x5x.c b/drivers/net/can/m_can/tcan4x5x.c index 57b2a69a60eb..a2d5e501a502 100644 --- a/drivers/net/can/m_can/tcan4x5x.c +++ b/drivers/net/can/m_can/tcan4x5x.c @@ -233,7 +233,7 @@ static struct regmap_bus tcan4x5x_bus = { static u32 tcan4x5x_read_reg(struct m_can_classdev *cdev, int reg) { - struct tcan4x5x_priv *priv = (struct tcan4x5x_priv *)cdev->device_data; + struct tcan4x5x_priv *priv = cdev->device_data; u32 val; tcan4x5x_check_wake(priv); @@ -245,7 +245,7 @@ static u32 tcan4x5x_read_reg(struct m_can_classdev *cdev, int reg) static u32 tcan4x5x_read_fifo(struct m_can_classdev *cdev, int addr_offset) { - struct tcan4x5x_priv *priv = (struct tcan4x5x_priv *)cdev->device_data; + struct tcan4x5x_priv *priv = cdev->device_data; u32 val; tcan4x5x_check_wake(priv); @@ -257,7 +257,7 @@ static u32 tcan4x5x_read_fifo(struct m_can_classdev *cdev, int addr_offset) static int tcan4x5x_write_reg(struct m_can_classdev *cdev, int reg, int val) { - struct tcan4x5x_priv *priv = (struct tcan4x5x_priv *)cdev->device_data; + struct tcan4x5x_priv *priv = cdev->device_data; tcan4x5x_check_wake(priv); @@ -267,8 +267,7 @@ static int tcan4x5x_write_reg(struct m_can_classdev *cdev, int reg, int val) static int tcan4x5x_write_fifo(struct m_can_classdev *cdev, int addr_offset, int val) { - struct tcan4x5x_priv *priv = - (struct tcan4x5x_priv *)cdev->device_data; + struct tcan4x5x_priv *priv = cdev->device_data; tcan4x5x_check_wake(priv); @@ -289,8 +288,7 @@ static int tcan4x5x_power_enable(struct regulator *reg, int enable) static int tcan4x5x_write_tcan_reg(struct m_can_classdev *cdev, int reg, int val) { - struct tcan4x5x_priv *priv = - (struct tcan4x5x_priv *)cdev->device_data; + struct tcan4x5x_priv *priv = cdev->device_data; tcan4x5x_check_wake(priv); @@ -299,8 +297,7 @@ static int tcan4x5x_write_tcan_reg(struct m_can_classdev *cdev, static int tcan4x5x_clear_interrupts(struct m_can_classdev *cdev) { - struct tcan4x5x_priv *tcan4x5x = - (struct tcan4x5x_priv *)cdev->device_data; + struct tcan4x5x_priv *tcan4x5x = cdev->device_data; int ret; tcan4x5x_check_wake(tcan4x5x); @@ -330,8 +327,7 @@ static int tcan4x5x_clear_interrupts(struct m_can_classdev *cdev) static int tcan4x5x_init(struct m_can_classdev *cdev) { - struct tcan4x5x_priv *tcan4x5x = - (struct tcan4x5x_priv *)cdev->device_data; + struct tcan4x5x_priv *tcan4x5x = cdev->device_data; int ret; tcan4x5x_check_wake(tcan4x5x); @@ -358,8 +354,7 @@ static int tcan4x5x_init(struct m_can_classdev *cdev) static int tcan4x5x_parse_config(struct m_can_classdev *cdev) { - struct tcan4x5x_priv *tcan4x5x = - (struct tcan4x5x_priv *)cdev->device_data; + struct tcan4x5x_priv *tcan4x5x = cdev->device_data; tcan4x5x->interrupt_gpio = devm_gpiod_get(cdev->dev, "data-ready", GPIOD_IN);