aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/iio/dac
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2022-06-17 01:00:23 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2022-06-18 16:38:05 +0100
commitf7108bcb34661a81cdcadf3f6118e025a0e14b4c (patch)
tree0b2cd40d98cfe33268d88161ef64b88a11b18549 /drivers/iio/dac
parentiio: accel: mma7660: Drop wrong use of ACPI_PTR() (diff)
downloadwireguard-linux-f7108bcb34661a81cdcadf3f6118e025a0e14b4c.tar.xz
wireguard-linux-f7108bcb34661a81cdcadf3f6118e025a0e14b4c.zip
iio: dac: stm32-dac: Replace open coded str_enable_disable()
Replace open coded str_enable_disable() in error message in stm32_dac_set_enable_state(). Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220616220023.9894-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/dac')
-rw-r--r--drivers/iio/dac/stm32-dac.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iio/dac/stm32-dac.c b/drivers/iio/dac/stm32-dac.c
index 0de1b09b92f7..15eb44075107 100644
--- a/drivers/iio/dac/stm32-dac.c
+++ b/drivers/iio/dac/stm32-dac.c
@@ -16,6 +16,7 @@
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
+#include <linux/string_helpers.h>
#include "stm32-dac-core.h"
@@ -81,8 +82,7 @@ static int stm32_dac_set_enable_state(struct iio_dev *indio_dev, int ch,
ret = regmap_update_bits(dac->common->regmap, STM32_DAC_CR, msk, en);
mutex_unlock(&dac->lock);
if (ret < 0) {
- dev_err(&indio_dev->dev, "%s failed\n", en ?
- "Enable" : "Disable");
+ dev_err(&indio_dev->dev, "%s failed\n", str_enable_disable(en));
goto err_put_pm;
}