pwm: lpss: Rename MAX_PWMS --> LPSS_MAX_PWMS
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 17 Nov 2022 11:08:01 +0000 (13:08 +0200)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 22 Nov 2022 14:36:27 +0000 (16:36 +0200)
The MAX_PWMS definition is already being used by the PWM core.
Using the same name in the certain driver confuses people
and potentially can clash with it.

Hence, rename it by adding LPSS prefix.

Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Thierry Reding <thierry.reding@gmail.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
drivers/pwm/pwm-lpss.c
drivers/pwm/pwm-lpss.h

index accdef5dd58e76d3f46dc7143e62caa4a352f2b0..b8739cd2c2351ed8dda3b67acf5535e6eaa75bb7 100644 (file)
@@ -252,7 +252,7 @@ struct pwm_lpss_chip *pwm_lpss_probe(struct device *dev, void __iomem *base,
        int i, ret;
        u32 ctrl;
 
-       if (WARN_ON(info->npwm > MAX_PWMS))
+       if (WARN_ON(info->npwm > LPSS_MAX_PWMS))
                return ERR_PTR(-ENODEV);
 
        lpwm = devm_kzalloc(dev, sizeof(*lpwm), GFP_KERNEL);
index 8e82eb5a7e009159004eb58f62cffab1031234f8..2c746c51b8831f510fe8ba86a60cf6c66fbc567a 100644 (file)
@@ -13,7 +13,7 @@
 #include <linux/device.h>
 #include <linux/pwm.h>
 
-#define MAX_PWMS                       4
+#define LPSS_MAX_PWMS                  4
 
 struct pwm_lpss_chip {
        struct pwm_chip chip;