Skip to content

Commit

Permalink
fbdev: omap2: connector-dvi: use of_get_i2c_adapter_by_node interface
Browse files Browse the repository at this point in the history
This change is needed to properly lock I2C bus driver, which serves DDC.

Prior to this change i2c_put_adapter() is misused, which may lead to
an overflow over zero of I2C bus driver user counter.

Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
  • Loading branch information
Vladimir Zapolskiy authored and Tomi Valkeinen committed Sep 24, 2015
1 parent 23aa4db commit ad38cc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/video/fbdev/omap2/displays-new/connector-dvi.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ static int dvic_probe_of(struct platform_device *pdev)

adapter_node = of_parse_phandle(node, "ddc-i2c-bus", 0);
if (adapter_node) {
adapter = of_find_i2c_adapter_by_node(adapter_node);
adapter = of_get_i2c_adapter_by_node(adapter_node);
if (adapter == NULL) {
dev_err(&pdev->dev, "failed to parse ddc-i2c-bus\n");
omap_dss_put_device(ddata->in);
Expand Down

0 comments on commit ad38cc5

Please sign in to comment.