[PATCH] i2c: drop empty i2c_driver.command implementations
authorLaurent Riffard <laurent.riffard@free.fr>
Sun, 18 Dec 2005 15:49:30 +0000 (16:49 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 6 Jan 2006 06:16:26 +0000 (22:16 -0800)
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>
drivers/i2c/i2c-dev.c
drivers/media/video/saa5246a.c
drivers/media/video/saa5249.c
drivers/video/matrox/matroxfb_maven.c

index ad6e04fc2c03c6d23a3d458151ff16d5fd3902d8..ed7eed388bae32caec406b4daf335cab07ad9e38 100644 (file)
@@ -464,12 +464,6 @@ static int i2cdev_detach_client(struct i2c_client *client)
        return 0;
 }
 
-static int i2cdev_command(struct i2c_client *client, unsigned int cmd,
-                           void *arg)
-{
-       return -1;
-}
-
 static struct i2c_driver i2cdev_driver = {
        .driver = {
                .name   = "dev_driver",
@@ -478,7 +472,6 @@ static struct i2c_driver i2cdev_driver = {
        .attach_adapter = i2cdev_attach_adapter,
        .detach_adapter = i2cdev_detach_adapter,
        .detach_client  = i2cdev_detach_client,
-       .command        = i2cdev_command,
 };
 
 static struct i2c_client i2cdev_client_template = {
index 135c21479fc019d211c79db9610044ac00689ebc..0aa9e72f632c605140c883787dd71af1708ac599 100644 (file)
@@ -151,12 +151,6 @@ static int saa5246a_detach(struct i2c_client *client)
        return 0;
 }
 
-static int saa5246a_command(struct i2c_client *device, unsigned int cmd,
-       void *arg)
-{
-       return -EINVAL;
-}
-
 /*
  *     I2C interfaces
  */
@@ -169,7 +163,6 @@ static struct i2c_driver i2c_driver_videotext =
        .id             = I2C_DRIVERID_SAA5249, /* in i2c.h */
        .attach_adapter = saa5246a_probe,
        .detach_client  = saa5246a_detach,
-       .command        = saa5246a_command
 };
 
 static struct i2c_client client_template = {
index d7c4e330cadda61dc3062326d03cb360c06ac9fc..a51c7bd96618ef767123dfec1b3a923b29fb5520 100644 (file)
@@ -226,12 +226,6 @@ static int saa5249_detach(struct i2c_client *client)
        return 0;
 }
 
-static int saa5249_command(struct i2c_client *device,
-                            unsigned int cmd, void *arg)
-{
-       return -EINVAL;
-}
-
 /* new I2C driver support */
 
 static struct i2c_driver i2c_driver_videotext = 
@@ -242,7 +236,6 @@ static struct i2c_driver i2c_driver_videotext =
        .id             = I2C_DRIVERID_SAA5249, /* in i2c.h */
        .attach_adapter = saa5249_probe,
        .detach_client  = saa5249_detach,
-       .command        = saa5249_command
 };
 
 static struct i2c_client client_template = {
index 255875378a3f4dde51b5f0c3bb6fb34317c98974..a1f2c5e8fc88ff97553d2524c63da92baf854b6f 100644 (file)
@@ -1288,10 +1288,6 @@ static int maven_detach_client(struct i2c_client* client) {
        return 0;
 }
 
-static int maven_command(struct i2c_client* client, unsigned int cmd, void* arg) {
-       return -ENOIOCTLCMD;    /* or -EINVAL, depends on who will call this */
-}
-
 static struct i2c_driver maven_driver={
        .driver = {
                .name   = "maven",
@@ -1299,7 +1295,6 @@ static struct i2c_driver maven_driver={
        .id             = I2C_DRIVERID_MGATVO,
        .attach_adapter = maven_attach_adapter,
        .detach_client  = maven_detach_client,
-       .command        = maven_command,
 };
 
 /* ************************** */