diff --git a/target/linux/realtek/files-6.12/drivers/i2c/busses/i2c-rtl9300.c b/target/linux/realtek/files-6.12/drivers/i2c/busses/i2c-rtl9300.c index 9565c4756f0..49d7dbf98bd 100644 --- a/target/linux/realtek/files-6.12/drivers/i2c/busses/i2c-rtl9300.c +++ b/target/linux/realtek/files-6.12/drivers/i2c/busses/i2c-rtl9300.c @@ -2,6 +2,7 @@ #include #include +#include #include "i2c-rtl9300.h" #define REG(i, x) (i->base + x + (i->scl_num ? i->mst2_offset : 0)) @@ -411,7 +412,7 @@ static int rtl9300_i2c_probe(struct platform_device *pdev) adap->dev.parent = &pdev->dev; i2c_set_adapdata(adap, i2c); adap->dev.of_node = node; - strlcpy(adap->name, dev_name(&pdev->dev), sizeof(adap->name)); + strscpy(adap->name, dev_name(&pdev->dev), sizeof(adap->name)); platform_set_drvdata(pdev, i2c); @@ -422,13 +423,11 @@ static int rtl9300_i2c_probe(struct platform_device *pdev) return ret; } -static int rtl9300_i2c_remove(struct platform_device *pdev) +static void rtl9300_i2c_remove(struct platform_device *pdev) { struct rtl9300_i2c *i2c = platform_get_drvdata(pdev); i2c_del_adapter(&i2c->adap); - - return 0; } struct i2c_drv_data rtl9300_i2c_drv_data = { diff --git a/target/linux/realtek/files-6.12/drivers/i2c/muxes/i2c-mux-rtl9300.c b/target/linux/realtek/files-6.12/drivers/i2c/muxes/i2c-mux-rtl9300.c index 57036d9d566..a19a1a148e6 100644 --- a/target/linux/realtek/files-6.12/drivers/i2c/muxes/i2c-mux-rtl9300.c +++ b/target/linux/realtek/files-6.12/drivers/i2c/muxes/i2c-mux-rtl9300.c @@ -251,7 +251,7 @@ static int rtl9300_i2c_mux_probe(struct platform_device *pdev) mux_data->sda_sel(muxc, channels[chan].sda_num); - ret = i2c_mux_add_adapter(muxc, 0, chan, 0); + ret = i2c_mux_add_adapter(muxc, 0, chan); if (ret) goto err_children; } @@ -268,14 +268,12 @@ err_parent: return ret; } -static int rtl9300_i2c_mux_remove(struct platform_device *pdev) +static void rtl9300_i2c_mux_remove(struct platform_device *pdev) { struct i2c_mux_core *muxc = platform_get_drvdata(pdev); i2c_mux_del_adapters(muxc); i2c_put_adapter(muxc->parent); - - return 0; } static struct platform_driver i2c_mux_driver = {