mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
i2c: rk3x: use restart_handler
Replace private pre_restart_handler which can remove on kernel 6.1. Signed-off-by: Tao Huang <huangtao@rock-chips.com> Change-Id: I79d3a16811b14c176a9d17d782f3cc17717fbd7f
This commit is contained in:
@@ -1536,8 +1536,8 @@ static int rk3x_i2c_probe(struct platform_device *pdev)
|
||||
init_waitqueue_head(&i2c->wait);
|
||||
|
||||
i2c->i2c_restart_nb.notifier_call = rk3x_i2c_restart_notify;
|
||||
i2c->i2c_restart_nb.priority = 128;
|
||||
ret = register_pre_restart_handler(&i2c->i2c_restart_nb);
|
||||
i2c->i2c_restart_nb.priority = 255;
|
||||
ret = register_restart_handler(&i2c->i2c_restart_nb);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "failed to setup i2c restart handler.\n");
|
||||
return ret;
|
||||
@@ -1682,7 +1682,7 @@ static int rk3x_i2c_remove(struct platform_device *pdev)
|
||||
i2c_del_adapter(&i2c->adap);
|
||||
|
||||
clk_notifier_unregister(i2c->clk, &i2c->clk_rate_nb);
|
||||
unregister_pre_restart_handler(&i2c->i2c_restart_nb);
|
||||
unregister_restart_handler(&i2c->i2c_restart_nb);
|
||||
clk_unprepare(i2c->pclk);
|
||||
clk_unprepare(i2c->clk);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user