On Mon, 2024-02-12 at 17:15 +0200, Kalle Valo wrote: > David Mosberger-Tang <davidm@xxxxxxxxxx> writes: > > > Previously, the driver created a net device (typically wlan0) as soon > > as the module was loaded. This commit changes the driver to follow > > normal Linux convention of creating the net device only when bus > > probing detects a supported chip. > > > > Signed-off-by: David Mosberger-Tang <davidm@xxxxxxxxxx> > > --- > > drivers/net/wireless/microchip/wilc1000/spi.c | 69 +++++++++++++++---- > > .../net/wireless/microchip/wilc1000/wlan.c | 3 +- > > .../net/wireless/microchip/wilc1000/wlan.h | 1 + > > 3 files changed, 57 insertions(+), 16 deletions(-) > > [...] > > > --- a/drivers/net/wireless/microchip/wilc1000/wlan.c > > +++ b/drivers/net/wireless/microchip/wilc1000/wlan.c > > @@ -12,10 +12,11 @@ > > > > #define WAKE_UP_TRIAL_RETRY 10000 > > > > -static inline bool is_wilc1000(u32 id) > > +bool is_wilc1000(u32 id) > > { > > return (id & (~WILC_CHIP_REV_FIELD)) == WILC_1000_BASE_ID; > > } > > +EXPORT_SYMBOL_GPL(is_wilc1000); > > > > static inline void acquire_bus(struct wilc *wilc, enum bus_acquire acquire) > > { > > diff --git a/drivers/net/wireless/microchip/wilc1000/wlan.h b/drivers/net/wireless/microchip/wilc1000/wlan.h > > index f02775f7e41f..ebdfb0afaf71 100644 > > --- a/drivers/net/wireless/microchip/wilc1000/wlan.h > > +++ b/drivers/net/wireless/microchip/wilc1000/wlan.h > > @@ -409,6 +409,7 @@ struct wilc_cfg_rsp { > > > > struct wilc_vif; > > > > +bool is_wilc1000(u32 id); > > I was about to apply this but then noticed the new EXPORT_SYMBOL_GPL(). > The overhead for such tiny function sounds too much, much better to move > the static inline function to wlan.h. Good point. I just sent V6 which has the inline function moved to wlan.h. Thanks, --david