diff mbox series

[v1] gpiolib: Update header block in gpiolib-cdev.h

Message ID 20201005095622.73616-1-andriy.shevchenko@linux.intel.com
State New
Headers show
Series [v1] gpiolib: Update header block in gpiolib-cdev.h | expand

Commit Message

Andy Shevchenko Oct. 5, 2020, 9:56 a.m. UTC
The dev_t is defined in types.h while struct gpio_device forward declaration
is missed. Take into account above and update header block in gpiolib-cdev.h.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/gpio/gpiolib-cdev.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Linus Walleij Oct. 7, 2020, 9:39 a.m. UTC | #1
On Mon, Oct 5, 2020 at 11:56 AM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:

> The dev_t is defined in types.h while struct gpio_device forward declaration
> is missed. Take into account above and update header block in gpiolib-cdev.h.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Patch applied with some fuzzing, thanks Andy!

Yours,
Linus Walleij
Linus Walleij Oct. 7, 2020, 9:43 a.m. UTC | #2
On Wed, Oct 7, 2020 at 11:39 AM Linus Walleij <linus.walleij@linaro.org> wrote:
> On Mon, Oct 5, 2020 at 11:56 AM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
>
> > The dev_t is defined in types.h while struct gpio_device forward declaration
> > is missed. Take into account above and update header block in gpiolib-cdev.h.
> >
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>
> Patch applied with some fuzzing, thanks Andy!

I noticed I do not need to fuzz it if I simply apply it to fixes....

Yours,
Linus Walleij
diff mbox series

Patch

diff --git a/drivers/gpio/gpiolib-cdev.h b/drivers/gpio/gpiolib-cdev.h
index 973578e7ad10..b42644cbffb8 100644
--- a/drivers/gpio/gpiolib-cdev.h
+++ b/drivers/gpio/gpiolib-cdev.h
@@ -3,7 +3,9 @@ 
 #ifndef GPIOLIB_CDEV_H
 #define GPIOLIB_CDEV_H
 
-#include <linux/device.h>
+#include <linux/types.h>
+
+struct gpio_device;
 
 int gpiolib_cdev_register(struct gpio_device *gdev, dev_t devt);
 void gpiolib_cdev_unregister(struct gpio_device *gdev);