]> err.no Git - linux-2.6/blobdiff - drivers/i2c/i2c-dev.c
Merge branch 'master' of /home/sam/kernel/linux-2.6/
[linux-2.6] / drivers / i2c / i2c-dev.c
index ad6e04fc2c03c6d23a3d458151ff16d5fd3902d8..58ccddd5c237dd5823140da8857691ed9780cc9f 100644 (file)
@@ -426,10 +426,7 @@ static int i2cdev_attach_adapter(struct i2c_adapter *adap)
 
        /* register this i2c device with the driver core */
        i2c_dev->adap = adap;
-       if (adap->dev.parent == &platform_bus)
-               dev = &adap->dev;
-       else
-               dev = adap->dev.parent;
+       dev = &adap->dev;
        i2c_dev->class_dev = class_device_create(i2c_dev_class, NULL,
                                                 MKDEV(I2C_MAJOR, i2c_dev->minor),
                                                 dev, "i2c-%d", i2c_dev->minor);
@@ -464,12 +461,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 +469,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 = {