i2c: exynos5: add CONFIG_PM_SLEEP to suspend/resume functions
Subsystems (2)
PATCH 1/2 i2c: exynos5: add CONFIG_PM_SLEEP to suspend/resume functions
Add CONFIG_PM_SLEEP to suspend/resume functions to fix the following build warning when CONFIG_PM_SLEEP is not selected. This is because sleep PM callbacks defined by SIMPLE_DEV_PM_OPS are only used when the CONFIG_PM_SLEEP is enabled.
warning: 'exynos5_i2c_suspend_noirq' defined but not used [-Wunused-function]
warning: 'exynos5_i2c_resume_noirq' defined but not used [-Wunused-function]
--- drivers/i2c/busses/i2c-exynos5.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/i2c/busses/i2c-exynos5.c +2 -0
@@ -715,6 +715,7 @@ static int exynos5_i2c_remove(struct platform_device *pdev)return 0 ; } +#ifdef CONFIG_PM_SLEEP static int exynos5_i2c_suspend_noirq (struct device *dev) {struct platform_device *pdev =to_platform_device (dev);
@@ -745,6 +746,7 @@ static int exynos5_i2c_resume_noirq(struct device *dev)return 0 ; } +#endif static SIMPLE_DEV_PM_OPS(exynos5_i2c_dev_pm_ops, exynos5_i2c_suspend_noirq, exynos5_i2c_resume_noirq);
Signature · 1 line
1.7.10.4
A message that is not in the archive (sent off-list or not yet received): 000501cf3cc8$4b7f8d90$e27ea8b0$%[email protected]
PATCH 2/2 i2c: exynos5: remove unnecessary cast of void pointer
Remove unnecessary cast of void pointer, because 'algo_data' of 'struct i2c_adapter' is a void pointer. Casting the void pointer is redundant. The conversion from void pointer to any other pointer type is guaranteed by the C programming language.
--- drivers/i2c/busses/i2c-exynos5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/i2c-exynos5.c +1 -1
@@ -566,7 +566,7 @@ static int exynos5_i2c_xfer_msg(struct exynos5_i2c *i2c,static int exynos5_i2c_xfer (struct i2c_adapter *adap,struct i2c_msg *msgs,int num) { -struct exynos5_i2c *i2c = (struct exynos5_i2c *)adap->algo_data; +struct exynos5_i2c *i2c = adap->algo_data;int i =0 , ret =0 , stop =0 ;if (i2c->suspended) {
Signature · 1 line
1.7.10.4
A message that is not in the archive (sent off-list or not yet received): 000601cf3cc8$70627460$51275d20$%[email protected]
Naveen Krishna Ch
Reviewed-by Naveen Krishna ChatradhiRe: [PATCH 2/2] i2c: exynos5: remove unnecessary cast of void pointer
Hello Mr. Han,
Quoted 6 lines · Jingoo Han
Remove unnecessary cast of void pointer, because '
algo_data' of 'structi2c_adapter' is a void pointer. Casting the void pointer is redundant. The conversion from void pointer to any other pointer type is guaranteed by the C programming language.Signed-off-by Jingoo Han <[email protected]>
Quoted 18 lines
--- drivers/i2c/busses/i2c-exynos5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/i2c/busses/i2c-exynos5.c +1
-2@@ -566,7 +566,7 @@ static int exynos5_i2c_xfer_msg(struct exynos5_i2c *i2c,static int exynos5_i2c_xfer (struct i2c_adapter *adap,struct i2c_msg *msgs,int num) { -struct exynos5_i2c *i2c = (struct exynos5_i2c *)adap->algo_data; +struct exynos5_i2c *i2c = adap->algo_data;int i =0 , ret =0 , stop =0 ;if (i2c->suspended) { --
Quoted 1 line
1.7.10.4
Thanks for the patch.
Quoted 6 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 2 lines
Shine bright, (: Nav :)
Wolfram Sang
AppliedRe: [PATCH 2/2] i2c: exynos5: remove unnecessary cast of void pointer
In reply to a message not in the archiveQuoted 6 lines · Jingoo Han
Remove unnecessary cast of void pointer, because '
algo_data' of 'structi2c_adapter' is a void pointer. Casting the void pointer is redundant. The conversion from void pointer to any other pointer type is guaranteed by the C programming language.Signed-off-by Jingoo Han <[email protected]>
Applied to for-next, thanks!
Wolfram Sang
AppliedQuoted 9 lines · Jingoo Han
Add
CONFIG_PM_SLEEPto suspend/resume functions to fix the following build warning whenCONFIG_PM_SLEEPis not selected. This is because sleep PM callbacks defined bySIMPLE_DEV_PM_OPSare only used when theCONFIG_PM_SLEEPis enabled.warning: '
exynos5_i2c_suspend_noirq' defined but not used [-Wunused-function]
warning: 'exynos5_i2c_resume_noirq' defined but not used [-Wunused-function]Signed-off-by Jingoo Han <[email protected]>
Applied to for-next, thanks!