can: tcan4x5x: remove not needed casts to struct tcan4x5x_priv *

The struct m_can_classdev::device_data is a void pointer, so there's no
need to cast it to struct tcan4x5x_priv *, when assigning the struct
tcan4x5x_priv pointer.

This patch removes the not needed casts from the tcan4x5x driver.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This commit is contained in:
Marc Kleine-Budde 2019-08-19 19:17:13 +02:00
Родитель 65668b3269
Коммит ad07819f22
1 изменённых файлов: 8 добавлений и 13 удалений

Просмотреть файл

@ -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);