]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
i2c: rename core source file to allow refactorization
authorWolfram Sang <wsa@the-dreams.de>
Tue, 23 May 2017 09:08:04 +0000 (11:08 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Wed, 31 May 2017 19:01:03 +0000 (21:01 +0200)
The I2C core became quite huge and its monolithic structure makes
maintenance hard. So, prepare to break out some functionality into
separate files by renaming the source file. Note that we keep the
resulting object name constant to avoid regressions.

Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Documentation/driver-api/i2c.rst
drivers/i2c/Makefile
drivers/i2c/busses/i2c-designware-core.c
drivers/i2c/i2c-core-base.c [moved from drivers/i2c/i2c-core.c with 100% similarity]

index f3939f7852bd59c9e5cd697a4f25986f356ac9d5..e6d4808ffbab3d58febf2301aed04ef4f804f18d 100644 (file)
@@ -42,5 +42,5 @@ i2c_adapter devices which don't support those I2C operations.
 .. kernel-doc:: drivers/i2c/i2c-boardinfo.c
    :functions: i2c_register_board_info
 
-.. kernel-doc:: drivers/i2c/i2c-core.c
+.. kernel-doc:: drivers/i2c/i2c-core-base.c
    :export:
index 45095b3d16a9140902d46225125e4e9496c27ca3..d459c7e5907607d3f9a3729d07b7f37fa8cf3eeb 100644 (file)
@@ -4,6 +4,8 @@
 
 obj-$(CONFIG_I2C_BOARDINFO)    += i2c-boardinfo.o
 obj-$(CONFIG_I2C)              += i2c-core.o
+i2c-core-objs                  := i2c-core-base.o
+
 obj-$(CONFIG_I2C_SMBUS)                += i2c-smbus.o
 obj-$(CONFIG_I2C_CHARDEV)      += i2c-dev.o
 obj-$(CONFIG_I2C_MUX)          += i2c-mux.o
@@ -12,4 +14,4 @@ obj-$(CONFIG_I2C_STUB)                += i2c-stub.o
 obj-$(CONFIG_I2C_SLAVE_EEPROM) += i2c-slave-eeprom.o
 
 ccflags-$(CONFIG_I2C_DEBUG_CORE) := -DDEBUG
-CFLAGS_i2c-core.o := -Wno-deprecated-declarations
+CFLAGS_i2c-core-base.o := -Wno-deprecated-declarations
index c453717b753b724a36aa4986aa90a5c16b2619b1..3c41995634c2f96717b9d72b59e1dcd04d5ff3ff 100644 (file)
@@ -583,7 +583,7 @@ i2c_dw_xfer_msg(struct dw_i2c_dev *dev)
                         */
 
                        /*
-                        * i2c-core.c always sets the buffer length of
+                        * i2c-core always sets the buffer length of
                         * I2C_FUNC_SMBUS_BLOCK_DATA to 1. The length will
                         * be adjusted when receiving the first byte.
                         * Thus we can't stop the transaction here.