Re: [PATCH v2 4/9] pwm: lpss: Include headers we are direct user of

From: Uwe Kleine-König
Date: Sat Sep 24 2022 - 06:05:08 EST


On Thu, Sep 08, 2022 at 04:56:53PM +0300, Andy Shevchenko wrote:
> For the sake of integrity, include headers we are direct user of.
>
> While at it, replace device.h with a forward declaration and add
> missed struct pwm_lpss_boardinfo one.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> ---
> drivers/pwm/pwm-lpss.h | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pwm/pwm-lpss.h b/drivers/pwm/pwm-lpss.h
> index c344921b2cab..839622964b2a 100644
> --- a/drivers/pwm/pwm-lpss.h
> +++ b/drivers/pwm/pwm-lpss.h
> @@ -10,11 +10,15 @@
> #ifndef __PWM_LPSS_H
> #define __PWM_LPSS_H
>
> -#include <linux/device.h>
> #include <linux/pwm.h>
> +#include <linux/types.h>
>
> #define MAX_PWMS 4
>
> +struct device;

It's not clear to me how this is an improvment. Isn't it saner to
include <linux/device.h>?

> +struct pwm_lpss_boardinfo;

Why is this necessary? The struct is defined a few lines below the
context of this patch and I see no user that would benefit.

Best regards
Uwe

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

Attachment: signature.asc
Description: PGP signature