Skip to content

Commit 0be16c3

Browse files
H Hartley SweetenJean Delvare
authored andcommitted
i2c-dev: Remove unnecessary casts
The private_data member of struct file is a void *, there is no need to cast it. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
1 parent 7aeb966 commit 0be16c3

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎drivers/i2c/i2c-dev.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ static ssize_t i2cdev_read (struct file *file, char __user *buf, size_t count,
138138
char *tmp;
139139
int ret;
140140

141-
struct i2c_client *client = (struct i2c_client *)file->private_data;
141+
struct i2c_client *client = file->private_data;
142142

143143
if (count > 8192)
144144
count = 8192;
@@ -162,7 +162,7 @@ static ssize_t i2cdev_write (struct file *file, const char __user *buf, size_t c
162162
{
163163
int ret;
164164
char *tmp;
165-
struct i2c_client *client = (struct i2c_client *)file->private_data;
165+
struct i2c_client *client = file->private_data;
166166

167167
if (count > 8192)
168168
count = 8192;
@@ -369,7 +369,7 @@ static noinline int i2cdev_ioctl_smbus(struct i2c_client *client,
369369

370370
static long i2cdev_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
371371
{
372-
struct i2c_client *client = (struct i2c_client *)file->private_data;
372+
struct i2c_client *client = file->private_data;
373373
unsigned long funcs;
374374

375375
dev_dbg(&client->adapter->dev, "ioctl, cmd=0x%02x, arg=0x%02lx\n",

0 commit comments

Comments
 (0)