Re: çå: [PATCH 1/2] misc: rtsx: Move Realtek Card Reader Driver to misc

From: Lee Jones
Date: Wed Oct 25 2017 - 05:17:01 EST


On Wed, 25 Oct 2017, åé wrote:

> > On Wed, 25 Oct 2017, rui_feng@xxxxxxxxxxxxxx wrote:
> >
> > > From: rui_feng <rui_feng@xxxxxxxxxxxxxx>
> > >
> > > Because Realtek PCIE card reader driver is a pcie driver, and it
> > > bridges mmc subsystem and memstick subsystem, it's not a mfd driver.
> > > Greg and Lee Jones had a discussion about where to put the driver, the
> > > result is that misc is a good place for it, so I move all files to
> > > misc. If I don't move it to a right place, I can't add any patch for
> > > this driver.
> > >
> > > Signed-off-by: Rui Feng <rui_feng@xxxxxxxxxxxxxx>
> > > Acked-by: Arnd Bergmann <arnd@xxxxxxxx>
> > > ---
> > > drivers/memstick/host/rtsx_pci_ms.c | 2 +-
> > > drivers/mfd/Kconfig | 11 -----------
> > > drivers/mfd/Makefile | 2 --
> > > drivers/misc/Kconfig | 1 +
> > > drivers/misc/Makefile | 1 +
> > > drivers/misc/realtek/Kconfig | 10 ++++++++++
> > > drivers/misc/realtek/Makefile | 3 +++
> > > drivers/{mfd => misc/realtek}/rtl8411.c | 1 - drivers/{mfd =>
> > > misc/realtek}/rts5209.c | 1 - drivers/{mfd =>
> > > misc/realtek}/rts5227.c | 1 - drivers/{mfd =>
> > > misc/realtek}/rts5229.c | 1 - drivers/{mfd =>
> > > misc/realtek}/rts5249.c | 2 -- drivers/{mfd =>
> > > misc/realtek}/rtsx_pcr.c | 1 - drivers/{mfd =>
> > > misc/realtek}/rtsx_pcr.h | 2 +-
> > > drivers/mmc/host/rtsx_pci_sdmmc.c | 2 +-
> > > include/linux/{mfd => }/rtsx_common.h | 0
> > > include/linux/{mfd => }/rtsx_pci.h | 0
> > > 17 files changed, 18 insertions(+), 23 deletions(-) create mode
> > > 100644 drivers/misc/realtek/Kconfig create mode 100644
> > > drivers/misc/realtek/Makefile rename drivers/{mfd =>
> > > misc/realtek}/rtl8411.c (99%) rename drivers/{mfd =>
> > > misc/realtek}/rts5209.c (99%) rename drivers/{mfd =>
> > > misc/realtek}/rts5227.c (99%) rename drivers/{mfd =>
> > > misc/realtek}/rts5229.c (99%) rename drivers/{mfd =>
> > > misc/realtek}/rts5249.c (99%) rename drivers/{mfd =>
> > > misc/realtek}/rtsx_pcr.c (99%) rename drivers/{mfd =>
> > > misc/realtek}/rtsx_pcr.h (99%) rename include/linux/{mfd =>
> > > }/rtsx_common.h (100%) rename include/linux/{mfd => }/rtsx_pci.h
> > > (100%)

[...]

> > > diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile index
> > > c3d0a1b..5398aca 100644
> > > --- a/drivers/mfd/Makefile
> > > +++ b/drivers/mfd/Makefile
> > > @@ -18,8 +18,6 @@ obj-$(CONFIG_MFD_CROS_EC_I2C) +=
> > cros_ec_i2c.o
> > > obj-$(CONFIG_MFD_CROS_EC_SPI) += cros_ec_spi.o
> > > obj-$(CONFIG_MFD_EXYNOS_LPASS) += exynos-lpass.o
> > >
> > > -rtsx_pci-objs := rtsx_pcr.o rts5209.o rts5229.o rtl8411.o
> > rts5227.o rts5249.o
> > > -obj-$(CONFIG_MFD_RTSX_PCI) += rtsx_pci.o
> > > obj-$(CONFIG_MFD_RTSX_USB) += rtsx_usb.o
> >
> > Why have you chosen not to move *all* rtsx drivers?
> >
> Maybe move the usb driver to misc in another patch is better?

I don't see why it's better, but as long as it gets done.

[...]

> > > diff --git a/drivers/mfd/rtl8411.c b/drivers/misc/realtek/rtl8411.c
> > > similarity index 99% rename from drivers/mfd/rtl8411.c rename to
> > > drivers/misc/realtek/rtl8411.c index b3ae659..aba05ad 100644
> > > --- a/drivers/mfd/rtl8411.c
> > > +++ b/drivers/misc/realtek/rtl8411.c
> > > @@ -23,7 +23,6 @@
> > > #include <linux/module.h>
> > > #include <linux/bitops.h>
> > > #include <linux/delay.h>
> > > -#include <linux/mfd/rtsx_pci.h>
> >
> > Didn't you move this to:
> >
> > <include>/linux/rtsx_pci.h
> >
> Because "rtsx_pcr.h" has include /linux/rtsx_pci.h, so no need to include /linux/rtsx_pci.h twice.

You should explicitly include header files.

--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org â Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog