can: mcp251x: Fix up includes
Subsystems (3)
PATCH 1/1 can: mcp251x: Fix up includes
This driver is including the legacy GPIO header <linux/gpio.h> but the only thing it is using from that header is the wrong define for GPIOF_DIR_OUT.
Fix it up by using GPIO_LINE_DIRECTION_* macros respectively.
--- drivers/net/can/spi/mcp251x.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/net/can/spi/mcp251x.c +2 -3
@@ -28,7 +28,6 @@#include <linux/device.h> #include <linux/ethtool.h> #include <linux/freezer.h> -#include <linux/gpio.h> #include <linux/gpio/driver.h> #include <linux/interrupt.h> #include <linux/io.h>
@@ -482,9 +481,9 @@ static int mcp251x_gpio_get_direction(struct gpio_chip *chip, unsigned int offset) {if (mcp251x_gpio_is_input (offset)) -return GPIOF_DIR_IN ; +return GPIO_LINE_DIRECTION_IN ; -return GPIOF_DIR_OUT ; +return GPIO_LINE_DIRECTION_OUT ; }static int mcp251x_gpio_get (struct gpio_chip *chip,unsigned int offset)
Signature · 1 line
2.43.0.rc1.1.gbec44491f096
Quoted 7 lines · Mon, Mar 18, 2024 at 08:34:10PM CET, [email protected] wrote:
This driver is including the legacy GPIO header <
linux/gpio.h> but the only thing it is using from that header is the wrong define forGPIOF_DIR_OUT.Fix it up by using GPIO_LINE_DIRECTION_* macros respectively.
Signed-off-by Andy Shevchenko <[email protected]>
net-next is closed, send again next week.
Quoted 8 lines · Jiri Pirko
Quoted 5 lines · Mon, Mar 18, 2024 at 08:34:10PM CET, [email protected] wrote:
This driver is including the legacy GPIO header <
linux/gpio.h> but the only thing it is using from that header is the wrong define forGPIOF_DIR_OUT.Fix it up by using GPIO_LINE_DIRECTION_* macros respectively.
net-next is closed, send again next week.
Thank you for the reminder. I have a question though. Can net adapt to the existence of lore.kernel.org please?
I mean it's not big deal to me to resend, but:
1) it adds too much noise in already noisy mailing lists;
2) it brings no value since we have lore.kernel.org archive;
3) last but not least, it saves a lot of resources and becomes environment friendly when we send _less_ emails.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Marc Kleine-Budde
maintainerQuoted 7 lines · Andy Shevchenko
This driver is including the legacy GPIO header <
linux/gpio.h> but the only thing it is using from that header is the wrong define forGPIOF_DIR_OUT.Fix it up by using GPIO_LINE_DIRECTION_* macros respectively.
Signed-off-by Andy Shevchenko <[email protected]>
No need to resend, added to linux-can-next.
Thanks,
Marc
Signature · 4 lines
Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung Nürnberg | Phone: +49-5121-206917-129 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
Quoted 8 lines · Marc Kleine-Budde
Quoted 5 lines · Andy Shevchenko
This driver is including the legacy GPIO header <
linux/gpio.h> but the only thing it is using from that header is the wrong define forGPIOF_DIR_OUT.Fix it up by using GPIO_LINE_DIRECTION_* macros respectively.
No need to resend, added to linux-can-next.
Thank you for taking care, although it doesn't cancel my question to the net subsystem flow in general.
Signature · 2 lines
With Best Regards, Andy Shevchenko