Commit c67f8a13 authored by Biju Das's avatar Biju Das Committed by Dmitry Torokhov

Input: da9063 - use dev_err_probe()

Replace dev_err()->dev_err_probe() to simplify probe().
Signed-off-by: default avatarBiju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20231213214803.9931-4-biju.das.jz@bp.renesas.comSigned-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent bd2334ed
...@@ -195,10 +195,9 @@ static int da9063_onkey_probe(struct platform_device *pdev) ...@@ -195,10 +195,9 @@ static int da9063_onkey_probe(struct platform_device *pdev)
onkey->dev = &pdev->dev; onkey->dev = &pdev->dev;
onkey->regmap = dev_get_regmap(pdev->dev.parent, NULL); onkey->regmap = dev_get_regmap(pdev->dev.parent, NULL);
if (!onkey->regmap) { if (!onkey->regmap)
dev_err(&pdev->dev, "Parent regmap unavailable.\n"); return dev_err_probe(&pdev->dev, -ENXIO,
return -ENXIO; "Parent regmap unavailable.\n");
}
onkey->key_power = !of_property_read_bool(pdev->dev.of_node, onkey->key_power = !of_property_read_bool(pdev->dev.of_node,
"dlg,disable-key-power"); "dlg,disable-key-power");
...@@ -228,11 +227,9 @@ static int da9063_onkey_probe(struct platform_device *pdev) ...@@ -228,11 +227,9 @@ static int da9063_onkey_probe(struct platform_device *pdev)
NULL, da9063_onkey_irq_handler, NULL, da9063_onkey_irq_handler,
IRQF_TRIGGER_LOW | IRQF_ONESHOT, IRQF_TRIGGER_LOW | IRQF_ONESHOT,
"ONKEY", onkey); "ONKEY", onkey);
if (error) { if (error)
dev_err(&pdev->dev, return dev_err_probe(&pdev->dev, error,
"Failed to request IRQ %d: %d\n", irq, error); "Failed to allocate onkey IRQ\n");
return error;
}
error = dev_pm_set_wake_irq(&pdev->dev, irq); error = dev_pm_set_wake_irq(&pdev->dev, irq);
if (error) if (error)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment