From 0d43acb0db3062cdf91b59ffb2c0aba0a2d65083 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BF=98=E6=80=80?= Date: Wed, 13 Nov 2024 18:32:00 +0800 Subject: [PATCH] i2c: phytium: Convert to platform remove callback returning void MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 0edb555: platform: Make platform_driver::remove() return void cause build error, so convert .remove from int to void Log: drivers/i2c/busses/i2c-phytium-platform.c:351:19: error: initialization of ‘void (*)(struct platform_device *)’ from incompatible pointer type ‘int (*)(struct platform_device *)’ [-Werror=incompatible-pointer-types] 351 | .remove = phytium_i2c_plat_remove, | ^~~~~~~~~~~~~~~~~~~~~~~ drivers/i2c/busses/i2c-phytium-platform.c:351:19: note: (near initialization for ‘phytium_i2c_driver..remove’) --- drivers/i2c/busses/i2c-phytium-platform.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-phytium-platform.c b/drivers/i2c/busses/i2c-phytium-platform.c index 7077d851d1f261..807feea1bf2a2c 100644 --- a/drivers/i2c/busses/i2c-phytium-platform.c +++ b/drivers/i2c/busses/i2c-phytium-platform.c @@ -290,7 +290,7 @@ static int phytium_i2c_plat_probe(struct platform_device *pdev) return ret; } -static int phytium_i2c_plat_remove(struct platform_device *pdev) +static void phytium_i2c_plat_remove(struct platform_device *pdev) { struct phytium_i2c_dev *dev = platform_get_drvdata(pdev); @@ -306,8 +306,6 @@ static int phytium_i2c_plat_remove(struct platform_device *pdev) if (!IS_ERR_OR_NULL(dev->rst)) reset_control_assert(dev->rst); - - return 0; } #ifdef CONFIG_OF