mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
drm/exynos: hdmi: take i2c adapter module reference
The i2c subsystem currently blocks during adapter deregistration whenever there are consumers holding a reference. Switch to using of_get_i2c_adapter_by_node() which also takes a reference to the adapter module so that an attempt to unload the module while in use fails gracefully instead of blocking uninterruptibly. Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
This commit is contained in:
parent
51f556d630
commit
99b1947ba2
|
|
@ -1923,7 +1923,7 @@ static int hdmi_get_ddc_adapter(struct hdmi_context *hdata)
|
|||
return -ENODEV;
|
||||
}
|
||||
|
||||
adpt = of_find_i2c_adapter_by_node(np);
|
||||
adpt = of_get_i2c_adapter_by_node(np);
|
||||
of_node_put(np);
|
||||
|
||||
if (!adpt) {
|
||||
|
|
@ -2079,7 +2079,7 @@ static int hdmi_probe(struct platform_device *pdev)
|
|||
if (hdata->regs_hdmiphy)
|
||||
iounmap(hdata->regs_hdmiphy);
|
||||
err_ddc:
|
||||
put_device(&hdata->ddc_adpt->dev);
|
||||
i2c_put_adapter(hdata->ddc_adpt);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -2104,7 +2104,7 @@ static void hdmi_remove(struct platform_device *pdev)
|
|||
if (hdata->regs_hdmiphy)
|
||||
iounmap(hdata->regs_hdmiphy);
|
||||
|
||||
put_device(&hdata->ddc_adpt->dev);
|
||||
i2c_put_adapter(hdata->ddc_adpt);
|
||||
|
||||
drm_bridge_put(hdata->bridge);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user