aboutsummaryrefslogtreecommitdiff
path: root/drivers/iio/adc/twl6030-gpadc.c
diff options
context:
space:
mode:
authorTang Bin <tangbin@cmss.chinamobile.com>2021-08-23 17:59:21 +0800
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2021-09-14 12:00:32 +0100
commitb0fc3f1dbe2a577c22dc52900856597ad5ea6bb3 (patch)
treee7df568971d5b5e61b77d040efde48b841c34e53 /drivers/iio/adc/twl6030-gpadc.c
parent050098500ae4f73f76a775b26fdf6ee5ee5bef40 (diff)
iio: adc: twl6030-gpadc: Use the defined variable to clean code
Use the defined variable "dev" to make the code cleaner. Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com> Link: https://lore.kernel.org/r/20210823095921.16828-1-tangbin@cmss.chinamobile.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/adc/twl6030-gpadc.c')
-rw-r--r--drivers/iio/adc/twl6030-gpadc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/iio/adc/twl6030-gpadc.c b/drivers/iio/adc/twl6030-gpadc.c
index c6416ad795ca..afdb59e0b526 100644
--- a/drivers/iio/adc/twl6030-gpadc.c
+++ b/drivers/iio/adc/twl6030-gpadc.c
@@ -900,7 +900,7 @@ static int twl6030_gpadc_probe(struct platform_device *pdev)
ret = pdata->calibrate(gpadc);
if (ret < 0) {
- dev_err(&pdev->dev, "failed to read calibration registers\n");
+ dev_err(dev, "failed to read calibration registers\n");
return ret;
}
@@ -914,14 +914,14 @@ static int twl6030_gpadc_probe(struct platform_device *pdev)
ret = twl6030_gpadc_enable_irq(TWL6030_GPADC_RT_SW1_EOC_MASK);
if (ret < 0) {
- dev_err(&pdev->dev, "failed to enable GPADC interrupt\n");
+ dev_err(dev, "failed to enable GPADC interrupt\n");
return ret;
}
ret = twl_i2c_write_u8(TWL6030_MODULE_ID1, TWL6030_GPADCS,
TWL6030_REG_TOGGLE1);
if (ret < 0) {
- dev_err(&pdev->dev, "failed to enable GPADC module\n");
+ dev_err(dev, "failed to enable GPADC module\n");
return ret;
}