aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/Makefile1
-rw-r--r--drivers/i2c/i2c-core.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/drivers/i2c/Makefile b/drivers/i2c/Makefile
index 23ac61e2db39..beee6b2d361d 100644
--- a/drivers/i2c/Makefile
+++ b/drivers/i2c/Makefile
@@ -10,3 +10,4 @@ obj-$(CONFIG_I2C_MUX) += i2c-mux.o
10obj-y += algos/ busses/ muxes/ 10obj-y += algos/ busses/ muxes/
11 11
12ccflags-$(CONFIG_I2C_DEBUG_CORE) := -DDEBUG 12ccflags-$(CONFIG_I2C_DEBUG_CORE) := -DDEBUG
13CFLAGS_i2c-core.o := -Wno-deprecated-declarations
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index b9fa1d0320b4..e5f76a0372fd 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -797,6 +797,9 @@ static int i2c_do_add_adapter(struct i2c_driver *driver,
797 797
798 /* Let legacy drivers scan this bus for matching devices */ 798 /* Let legacy drivers scan this bus for matching devices */
799 if (driver->attach_adapter) { 799 if (driver->attach_adapter) {
800 dev_warn(&adap->dev, "attach_adapter method is deprecated\n");
801 dev_warn(&adap->dev, "Please use another way to instantiate "
802 "your i2c_client\n");
800 /* We ignore the return code; if it fails, too bad */ 803 /* We ignore the return code; if it fails, too bad */
801 driver->attach_adapter(adap); 804 driver->attach_adapter(adap);
802 } 805 }
@@ -981,6 +984,7 @@ static int i2c_do_del_adapter(struct i2c_driver *driver,
981 984
982 if (!driver->detach_adapter) 985 if (!driver->detach_adapter)
983 return 0; 986 return 0;
987 dev_warn(&adapter->dev, "detach_adapter method is deprecated\n");
984 res = driver->detach_adapter(adapter); 988 res = driver->detach_adapter(adapter);
985 if (res) 989 if (res)
986 dev_err(&adapter->dev, "detach_adapter failed (%d) " 990 dev_err(&adapter->dev, "detach_adapter failed (%d) "