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

i2c-dev: Delete empty detach_client callback

Implementing detach_client is optional, so there is no point in
an empty implementation.

Likewise, i2c driver IDs are optional, and we don't need one.

Signed-off-by: Jean Delvare <khali@linux-fr.org>

authored by

Jean Delvare and committed by
Jean Delvare
f6a71105 954a9930

-9
-7
drivers/i2c/i2c-dev.c
··· 548 548 return 0; 549 549 } 550 550 551 - static int i2cdev_detach_client(struct i2c_client *client) 552 - { 553 - return 0; 554 - } 555 - 556 551 static struct i2c_driver i2cdev_driver = { 557 552 .driver = { 558 553 .name = "dev_driver", 559 554 }, 560 - .id = I2C_DRIVERID_I2CDEV, 561 555 .attach_adapter = i2cdev_attach_adapter, 562 556 .detach_adapter = i2cdev_detach_adapter, 563 - .detach_client = i2cdev_detach_client, 564 557 }; 565 558 566 559 /* ------------------------------------------------------------------------- */
-2
include/linux/i2c-id.h
··· 91 91 #define I2C_DRIVERID_M52790 95 /* Mitsubishi M52790SP/FP AV switch */ 92 92 #define I2C_DRIVERID_CS5345 96 /* cs5345 audio processor */ 93 93 94 - #define I2C_DRIVERID_I2CDEV 900 95 - 96 94 #define I2C_DRIVERID_OV7670 1048 /* Omnivision 7670 camera */ 97 95 98 96 /*