Re: [PATCH] pinctrl: sx150x: support building as module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 5, 2021 at 2:57 AM Sander Vanheule <sander@xxxxxxxxxxxxx> wrote:
>
> The SX150x GPIO expander driver, and the subsystems it depends on, have
> seen some development since its initial introduction. Let's add some
> extra bits to enable building it as a module.
>
> Build tested on 5.12-rc1. Run tested on a MIPS device with OpenWrt,
> kernel version 5.4.101, to confirm unloading/reloading works.
>
> Signed-off-by: Sander Vanheule <sander@xxxxxxxxxxxxx>
> ---
> This is the first time I've attempted to create a driver that can be
> built as a module, so there's a reasonable chance I missed some things.

Indeed, see below.

...

> -#include <linux/init.h>

Nope, you have to leave it. See more below.

>  #include <linux/interrupt.h>
>  #include <linux/irq.h>
> +#include <linux/module.h>

(This is correct)

...

> +module_i2c_driver(sx150x_driver);

Nope. You have to leave below.

> -subsys_initcall(sx150x_init);

subsys_initcall != device_initcall


-- 
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux