realtek: 6.12: adapt RTL9300 i2c bus & mux drivers
Fix minor compilation errors due to kernel changes. Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com> Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de> Link: https://github.com/openwrt/openwrt/pull/18935 Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
parent
d9a5cafc40
commit
abee1c2040
2 changed files with 5 additions and 8 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/platform_device.h>
|
||||
#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 = {
|
||||
|
|
|
@ -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 = {
|
||||
|
|
Loading…
Reference in a new issue