commit 687b81d083c082bc1e853032e3a2a54f8c251d27 Author: Wolfram Sang Date: Thu Jul 11 12:56:15 2013 +0100 i2c: move OF helpers into the core I2C of helpers used to live in of_i2c.c but experience (from SPI) shows that it is much cleaner to have this in the core. This also removes a circular dependency between the helpers and the core, and so we can finally register child nodes in the core instead of doing this manually in each driver. So, fix the drivers and documentation, too. Signed-off-by: Wolfram Sang commit 874e955b171f0505e2371c1ca80a2188efdc217d Author: Wolfram Sang Date: Thu Jul 11 22:02:03 2013 +0100 i2c: powermac: fix return path on error We want to bail out immediately if i2c_add_adapter failed and not try to register child nodes with a nilled adapter structure. Signed-off-by: Wolfram Sang commit 6d4028c644edc0a2e4a8c948ebf81e8f2f09726e Author: Jingoo Han Date: Tue Jul 30 16:59:33 2013 +0900 i2c: use dev_get_platdata() Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. Signed-off-by: Jingoo Han Signed-off-by: Wolfram Sang commit bf51a8c5e0b6133b929eb7d7456e99a605f8168c Author: Lars-Peter Clausen Date: Sat Mar 9 08:16:46 2013 +0000 i2c: Ignore return value of i2c_del_adapter() i2c_del_adapter() always returns 0. So all checks testing whether it will be non zero will always evaluate to false and the conditional code is dead code. This patch updates all callers of i2c_del_mux_adapter() to ignore the return value and assume that it will always succeed (which it will). In a subsequent patch the return type of i2c_del_adapter() will be made void. Signed-off-by: Lars-Peter Clausen Acked-by: Ben Hutchings Reviewed-by: Jean Delvare Acked-by: Shawn Guo Signed-off-by: Wolfram Sang commit 55827f4aa6442ddd1d6a4e1e32f2f457eb113c22 Author: Doug Anderson Date: Fri Feb 15 13:18:35 2013 +0000 i2c: Remove unneeded xxx_set_drvdata(..., NULL) calls There is simply no reason to be manually setting the private driver data to NULL in the remove/fail to probe cases. This is just extra cruft code that can be removed. A few notes: * Nothing relies on drvdata being set to NULL. * The __device_release_driver() function eventually calls dev_set_drvdata(dev, NULL) anyway, so there's no need to do it twice. * I verified that there were no cases where xxx_get_drvdata() was being called in these drivers and checking for / relying on the NULL return value. This could be cleaned up kernel-wide but for now just take the baby step and remove from the i2c subsystem. Reported-by: Wolfram Sang Reported-by: Stephen Warren Signed-off-by: Doug Anderson Reviewed-by: Jean Delvare Acked-by: Peter Korsgaard Reviewed-by: Mika Westerberg Reviewed-by: Marek Vasut Signed-off-by: Wolfram Sang commit 0b255e927d47b550620dfd3475ee74b0f52e09c8 Author: Bill Pemberton Date: Tue Nov 27 15:59:38 2012 -0500 commit 687b81d083c082bc1e853032e3a2a54f8c251d27 Author: Wolfram Sang Date: Thu Jul 11 12:56:15 2013 +0100 i2c: move OF helpers into the core I2C of helpers used to live in of_i2c.c but experience (from SPI) shows that it is much cleaner to have this in the core. This also removes a circular dependency between the helpers and the core, and so we can finally register child nodes in the core instead of doing this manually in each driver. So, fix the drivers and documentation, too. Signed-off-by: Wolfram Sang commit 874e955b171f0505e2371c1ca80a2188efdc217d Author: Wolfram Sang Date: Thu Jul 11 22:02:03 2013 +0100 i2c: powermac: fix return path on error We want to bail out immediately if i2c_add_adapter failed and not try to register child nodes with a nilled adapter structure. Signed-off-by: Wolfram Sang commit 6d4028c644edc0a2e4a8c948ebf81e8f2f09726e Author: Jingoo Han Date: Tue Jul 30 16:59:33 2013 +0900 i2c: use dev_get_platdata() Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. Signed-off-by: Jingoo Han Signed-off-by: Wolfram Sang commit bf51a8c5e0b6133b929eb7d7456e99a605f8168c Author: Lars-Peter Clausen Date: Sat Mar 9 08:16:46 2013 +0000 i2c: Ignore return value of i2c_del_adapter() i2c_del_adapter() always returns 0. So all checks testing whether it will be non zero will always evaluate to false and the conditional code is dead code. This patch updates all callers of i2c_del_mux_adapter() to ignore the return value and assume that it will always succeed (which it will). In a subsequent patch the return type of i2c_del_adapter() will be made void. Signed-off-by: Lars-Peter Clausen Acked-by: Ben Hutchings Reviewed-by: Jean Delvare Acked-by: Shawn Guo Signed-off-by: Wolfram Sang commit 55827f4aa6442ddd1d6a4e1e32f2f457eb113c22 Author: Doug Anderson Date: Fri Feb 15 13:18:35 2013 +0000 i2c: Remove unneeded xxx_set_drvdata(..., NULL) calls There is simply no reason to be manually setting the private driver data to NULL in the remove/fail to probe cases. This is just extra cruft code that can be removed. A few notes: * Nothing relies on drvdata being set to NULL. * The __device_release_driver() function eventually calls dev_set_drvdata(dev, NULL) anyway, so there's no need to do it twice. * I verified that there were no cases where xxx_get_drvdata() was being called in these drivers and checking for / relying on the NULL return value. This could be cleaned up kernel-wide but for now just take the baby step and remove from the i2c subsystem. Reported-by: Wolfram Sang Reported-by: Stephen Warren Signed-off-by: Doug Anderson Reviewed-by: Jean Delvare Acked-by: Peter Korsgaard Reviewed-by: Mika Westerberg Reviewed-by: Marek Vasut Signed-off-by: Wolfram Sang