summaryrefslogtreecommitdiffstats
path: root/drivers/iio/gyro
diff options
context:
space:
mode:
authorNishant Malpani <nish.malpani25@gmail.com>2020-03-22 22:53:06 +0530
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2020-04-19 16:56:15 +0100
commit442140989f2d777d9cf02622c76f0ac8a4b891b3 (patch)
treed2c8f94242b39c20711c5a33ef2282b15e29f913 /drivers/iio/gyro
parentf0bd45fea3ea9c73040228bc95dd9a2ca74b2b17 (diff)
downloadlinux-442140989f2d777d9cf02622c76f0ac8a4b891b3.tar.bz2
iio: gyro: bmg160_i2c: Use vsprintf extension %pe for symbolic error name
Utilize %pe format specifier from vsprintf while printing error logs with dev_err(). Discards the use of unnecessary explicit casting and prints symbolic error name which might prove to be convenient during debugging. Signed-off-by: Nishant Malpani <nish.malpani25@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/gyro')
-rw-r--r--drivers/iio/gyro/bmg160_i2c.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iio/gyro/bmg160_i2c.c b/drivers/iio/gyro/bmg160_i2c.c
index de15c6fc3381..b3fa46bd02cb 100644
--- a/drivers/iio/gyro/bmg160_i2c.c
+++ b/drivers/iio/gyro/bmg160_i2c.c
@@ -21,8 +21,8 @@ static int bmg160_i2c_probe(struct i2c_client *client,
regmap = devm_regmap_init_i2c(client, &bmg160_regmap_i2c_conf);
if (IS_ERR(regmap)) {
- dev_err(&client->dev, "Failed to register i2c regmap %d\n",
- (int)PTR_ERR(regmap));
+ dev_err(&client->dev, "Failed to register i2c regmap: %pe\n",
+ regmap);
return PTR_ERR(regmap);
}