Re: [PATCH v2 2/9] pwm: lpss: Move exported symbols to PWM_LPSS namespace

From: Uwe Kleine-König
Date: Sat Sep 24 2022 - 06:00:15 EST


Hello,

On Thu, Sep 08, 2022 at 04:56:51PM +0300, Andy Shevchenko wrote:
> Avoid unnecessary pollution of the global symbol namespace by
> moving library functions in to a specific namespace and import
> that into the drivers that make use of the functions.
>
> For more info: https://lwn.net/Articles/760045/
>
> Suggested-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> ---
> drivers/pwm/pwm-lpss-pci.c | 1 +
> drivers/pwm/pwm-lpss-platform.c | 1 +
> drivers/pwm/pwm-lpss.c | 2 ++
> 3 files changed, 4 insertions(+)
>
> diff --git a/drivers/pwm/pwm-lpss-pci.c b/drivers/pwm/pwm-lpss-pci.c
> index 75b778e839b3..9f2c666b95ec 100644
> --- a/drivers/pwm/pwm-lpss-pci.c
> +++ b/drivers/pwm/pwm-lpss-pci.c
> @@ -92,3 +92,4 @@ module_pci_driver(pwm_lpss_driver_pci);
>
> MODULE_DESCRIPTION("PWM PCI driver for Intel LPSS");
> MODULE_LICENSE("GPL v2");
> +MODULE_IMPORT_NS(PWM_LPSS);

Each user of the lpss.h header needs that, right? Then the
MODULE_IMPORT_NS statement can go into the header, too.

Even without this change:

Acked-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>

Thanks
Uwe

--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |

Attachment: signature.asc
Description: PGP signature