Skip to content

Commit b8787ff

Browse files
krzkchanwoochoi
authored andcommitted
extcon: ptn5150: Reduce the amount of logs on deferred probe
There is no point to print deferred probe (and its failures to get resources) as an error. In case of multiple probe tries this would pollute the dmesg. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Reviewed-by: Vijai Kumar K <vijaikumar.kanagarajan@gmail.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
1 parent fbaf3b6 commit b8787ff

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

‎drivers/extcon/extcon-ptn5150.c‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ static int ptn5150_i2c_probe(struct i2c_client *i2c,
243243
dev_info(dev, "No VBUS GPIO, ignoring VBUS control\n");
244244
info->vbus_gpiod = NULL;
245245
} else {
246-
dev_err(dev, "failed to get VBUS GPIO\n");
246+
dev_err_probe(dev, ret, "failed to get VBUS GPIO\n");
247247
return ret;
248248
}
249249
}
@@ -255,8 +255,8 @@ static int ptn5150_i2c_probe(struct i2c_client *i2c,
255255
info->regmap = devm_regmap_init_i2c(i2c, &ptn5150_regmap_config);
256256
if (IS_ERR(info->regmap)) {
257257
ret = PTR_ERR(info->regmap);
258-
dev_err(info->dev, "failed to allocate register map: %d\n",
259-
ret);
258+
dev_err_probe(info->dev, ret, "failed to allocate register map: %d\n",
259+
ret);
260260
return ret;
261261
}
262262

@@ -265,8 +265,9 @@ static int ptn5150_i2c_probe(struct i2c_client *i2c,
265265
} else {
266266
info->int_gpiod = devm_gpiod_get(&i2c->dev, "int", GPIOD_IN);
267267
if (IS_ERR(info->int_gpiod)) {
268-
dev_err(dev, "failed to get INT GPIO\n");
269-
return PTR_ERR(info->int_gpiod);
268+
ret = PTR_ERR(info->int_gpiod);
269+
dev_err_probe(dev, ret, "failed to get INT GPIO\n");
270+
return ret;
270271
}
271272

272273
info->irq = gpiod_to_irq(info->int_gpiod);

0 commit comments

Comments
 (0)