Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] i2c: drop empty i2c_driver.command implementations

Given that implementing i2c_driver.command is optional, there is no
point in an empty implementation thereof.

Signed-off-by: Laurent Riffard <laurent.riffard@free.fr>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Michael Geng <linux@MichaelGeng.de>
Cc: Petr Vandrovec <vandrove@vc.cvut.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Laurent Riffard and committed by
Greg Kroah-Hartman
d564baee 04b4b843

-26
-7
drivers/i2c/i2c-dev.c
··· 464 464 return 0; 465 465 } 466 466 467 - static int i2cdev_command(struct i2c_client *client, unsigned int cmd, 468 - void *arg) 469 - { 470 - return -1; 471 - } 472 - 473 467 static struct i2c_driver i2cdev_driver = { 474 468 .driver = { 475 469 .name = "dev_driver", ··· 472 478 .attach_adapter = i2cdev_attach_adapter, 473 479 .detach_adapter = i2cdev_detach_adapter, 474 480 .detach_client = i2cdev_detach_client, 475 - .command = i2cdev_command, 476 481 }; 477 482 478 483 static struct i2c_client i2cdev_client_template = {
-7
drivers/media/video/saa5246a.c
··· 151 151 return 0; 152 152 } 153 153 154 - static int saa5246a_command(struct i2c_client *device, unsigned int cmd, 155 - void *arg) 156 - { 157 - return -EINVAL; 158 - } 159 - 160 154 /* 161 155 * I2C interfaces 162 156 */ ··· 163 169 .id = I2C_DRIVERID_SAA5249, /* in i2c.h */ 164 170 .attach_adapter = saa5246a_probe, 165 171 .detach_client = saa5246a_detach, 166 - .command = saa5246a_command 167 172 }; 168 173 169 174 static struct i2c_client client_template = {
-7
drivers/media/video/saa5249.c
··· 226 226 return 0; 227 227 } 228 228 229 - static int saa5249_command(struct i2c_client *device, 230 - unsigned int cmd, void *arg) 231 - { 232 - return -EINVAL; 233 - } 234 - 235 229 /* new I2C driver support */ 236 230 237 231 static struct i2c_driver i2c_driver_videotext = ··· 236 242 .id = I2C_DRIVERID_SAA5249, /* in i2c.h */ 237 243 .attach_adapter = saa5249_probe, 238 244 .detach_client = saa5249_detach, 239 - .command = saa5249_command 240 245 }; 241 246 242 247 static struct i2c_client client_template = {
-5
drivers/video/matrox/matroxfb_maven.c
··· 1288 1288 return 0; 1289 1289 } 1290 1290 1291 - static int maven_command(struct i2c_client* client, unsigned int cmd, void* arg) { 1292 - return -ENOIOCTLCMD; /* or -EINVAL, depends on who will call this */ 1293 - } 1294 - 1295 1291 static struct i2c_driver maven_driver={ 1296 1292 .driver = { 1297 1293 .name = "maven", ··· 1295 1299 .id = I2C_DRIVERID_MGATVO, 1296 1300 .attach_adapter = maven_attach_adapter, 1297 1301 .detach_client = maven_detach_client, 1298 - .command = maven_command, 1299 1302 }; 1300 1303 1301 1304 /* ************************** */