Message ID | 1347368390-31252-9-git-send-email-arnd@arndb.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 09/11/2012 06:59 AM, Arnd Bergmann wrote: > Platform data for device drivers should be defined in > include/linux/platform_data/*.h, not in the architecture > and platform specific directories. > > This moves such data out of the tegra include directories I have already submitted patches for some of these: > .../linux/platform_data/asoc-tegra_wm8903.h | 0 03f6743 ASoC: tegra: move platform data header This moves the file to include/sound/tegra_wm8903.h, which seems consistent with other sound-related platform data. > .../mach/kbc.h => include/linux/platform_data/keyboard-tegra-kbc.h | 0 a85442a Input: tegra - move platform data header This moves the file to include/linux/input/tegra_kbc.h, which seems consistent with other input-related platform data. > .../mach/sdhci.h => include/linux/platform_data/mmc-sdhci-tegra.h | 0 I have a not-yet-applied (but ack'd by Chris Ball) patch to move this to include/linux/mmc/tegra_sdhci.h. I believe all the dependencies are staged in the Tegra tree now, so I can apply it if you want. I'm fine with you apply this patch though; just let me know. If you want to take your patch, then this part: Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Hi Arnd, On Tue, Sep 11 2012, Arnd Bergmann wrote: > diff --git a/arch/arm/mach-tegra/include/mach/sdhci.h > b/include/linux/platform_data/mmc-sdhci-tegra.h > similarity index 100% > rename from arch/arm/mach-tegra/include/mach/sdhci.h > rename to include/linux/platform_data/mmc-sdhci-tegra.h Looks like you aren't renaming the idempotency guards, so e.g. include/linux/platform_data/mmc-sdhci-tegra.h will contain: #ifndef __ASM_ARM_ARCH_TEGRA_SDHCI_H #define __ASM_ARM_ARCH_TEGRA_SDHCI_H Is that intentional? Thanks, - Chris.
On Tuesday 11 September 2012, Chris Ball wrote: > On Tue, Sep 11 2012, Arnd Bergmann wrote: > > diff --git a/arch/arm/mach-tegra/include/mach/sdhci.h > > b/include/linux/platform_data/mmc-sdhci-tegra.h > > similarity index 100% > > rename from arch/arm/mach-tegra/include/mach/sdhci.h > > rename to include/linux/platform_data/mmc-sdhci-tegra.h > > Looks like you aren't renaming the idempotency guards, so e.g. > include/linux/platform_data/mmc-sdhci-tegra.h will contain: > > #ifndef __ASM_ARM_ARCH_TEGRA_SDHCI_H > #define __ASM_ARM_ARCH_TEGRA_SDHCI_H > > Is that intentional? Thanks, > No, it's not intentional. We actually have a lot of instances that are already wrong. Do we care enough to change the ones I'm moving here? Arnd
Hi, On Tue, Sep 11 2012, Arnd Bergmann wrote: >> Looks like you aren't renaming the idempotency guards, so e.g. >> include/linux/platform_data/mmc-sdhci-tegra.h will contain: >> >> #ifndef __ASM_ARM_ARCH_TEGRA_SDHCI_H >> #define __ASM_ARM_ARCH_TEGRA_SDHCI_H >> >> Is that intentional? Thanks, > > No, it's not intentional. We actually have a lot of instances that > are already wrong. Do we care enough to change the ones I'm moving here? It's clearly not a big deal. I did fix it in Stephen's previous version of this change, though. Maybe just add a note to the commit message explaining that you aren't changing the guards and driver maintainers might want to fix them up if it's something they care about? Thanks, - Chris.
You'll want to check that you don't have any cases where two files use the same guard, I'd think. Chris -----Original Message----- From: linux-arm-kernel-bounces@lists.infradead.org [mailto:linux-arm-kernel-bounces@lists.infradead.org] On Behalf Of Arnd Bergmann Sent: September 11, 2012 10:06 AM To: Chris Ball Cc: Mark Brown; Russell King; Stephen Warren; Dmitry Torokhov; linux-kernel@vger.kernel.org; linux-tegra@vger.kernel.org; Colin Cross; Olof Johansson; Liam Girdwood; linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 09/16] ARM: tegra: move platform_data definitions On Tuesday 11 September 2012, Chris Ball wrote: > On Tue, Sep 11 2012, Arnd Bergmann wrote: > > diff --git a/arch/arm/mach-tegra/include/mach/sdhci.h > > b/include/linux/platform_data/mmc-sdhci-tegra.h > > similarity index 100% > > rename from arch/arm/mach-tegra/include/mach/sdhci.h > > rename to include/linux/platform_data/mmc-sdhci-tegra.h > > Looks like you aren't renaming the idempotency guards, so e.g. > include/linux/platform_data/mmc-sdhci-tegra.h will contain: > > #ifndef __ASM_ARM_ARCH_TEGRA_SDHCI_H > #define __ASM_ARM_ARCH_TEGRA_SDHCI_H > > Is that intentional? Thanks, > No, it's not intentional. We actually have a lot of instances that are already wrong. Do we care enough to change the ones I'm moving here? Arnd
diff --git a/arch/arm/mach-tegra/board-harmony.c b/arch/arm/mach-tegra/board-harmony.c index e65e837..31b3b72 100644 --- a/arch/arm/mach-tegra/board-harmony.c +++ b/arch/arm/mach-tegra/board-harmony.c @@ -35,10 +35,10 @@ #include <asm/hardware/gic.h> #include <asm/setup.h> -#include <mach/tegra_wm8903_pdata.h> +#include <linux/platform_data/asoc-tegra_wm8903.h> #include <mach/iomap.h> #include <mach/irqs.h> -#include <mach/sdhci.h> +#include <linux/platform_data/mmc-sdhci-tegra.h> #include "board.h" #include "board-harmony.h" diff --git a/arch/arm/mach-tegra/board-paz00.c b/arch/arm/mach-tegra/board-paz00.c index 4b64af5..6dd6854 100644 --- a/arch/arm/mach-tegra/board-paz00.c +++ b/arch/arm/mach-tegra/board-paz00.c @@ -40,7 +40,7 @@ #include <mach/iomap.h> #include <mach/irqs.h> -#include <mach/sdhci.h> +#include <linux/platform_data/mmc-sdhci-tegra.h> #include "board.h" #include "board-paz00.h" diff --git a/arch/arm/mach-tegra/board-trimslice.c b/arch/arm/mach-tegra/board-trimslice.c index 776aa95..fb80c8f 100644 --- a/arch/arm/mach-tegra/board-trimslice.c +++ b/arch/arm/mach-tegra/board-trimslice.c @@ -34,7 +34,7 @@ #include <asm/setup.h> #include <mach/iomap.h> -#include <mach/sdhci.h> +#include <linux/platform_data/mmc-sdhci-tegra.h> #include "board.h" #include "clock.h" diff --git a/drivers/input/keyboard/tegra-kbc.c b/drivers/input/keyboard/tegra-kbc.c index 2c1c9ed..40aded8 100644 --- a/drivers/input/keyboard/tegra-kbc.c +++ b/drivers/input/keyboard/tegra-kbc.c @@ -30,7 +30,7 @@ #include <linux/clk.h> #include <linux/slab.h> #include <mach/clk.h> -#include <mach/kbc.h> +#include <linux/platform_data/keyboard-tegra-kbc.h> #define KBC_MAX_DEBOUNCE_CNT 0x3ffu diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c index 0810ccc..d43e746 100644 --- a/drivers/mmc/host/sdhci-tegra.c +++ b/drivers/mmc/host/sdhci-tegra.c @@ -28,7 +28,7 @@ #include <asm/gpio.h> #include <mach/gpio-tegra.h> -#include <mach/sdhci.h> +#include <linux/platform_data/mmc-sdhci-tegra.h> #include "sdhci-pltfm.h" diff --git a/arch/arm/mach-tegra/include/mach/tegra_wm8903_pdata.h b/include/linux/platform_data/asoc-tegra_wm8903.h similarity index 100% rename from arch/arm/mach-tegra/include/mach/tegra_wm8903_pdata.h rename to include/linux/platform_data/asoc-tegra_wm8903.h diff --git a/arch/arm/mach-tegra/include/mach/kbc.h b/include/linux/platform_data/keyboard-tegra-kbc.h similarity index 100% rename from arch/arm/mach-tegra/include/mach/kbc.h rename to include/linux/platform_data/keyboard-tegra-kbc.h diff --git a/arch/arm/mach-tegra/include/mach/sdhci.h b/include/linux/platform_data/mmc-sdhci-tegra.h similarity index 100% rename from arch/arm/mach-tegra/include/mach/sdhci.h rename to include/linux/platform_data/mmc-sdhci-tegra.h diff --git a/sound/soc/tegra/tegra_wm8903.c b/sound/soc/tegra/tegra_wm8903.c index d4f14e4..8deedf5 100644 --- a/sound/soc/tegra/tegra_wm8903.c +++ b/sound/soc/tegra/tegra_wm8903.c @@ -34,7 +34,7 @@ #include <linux/gpio.h> #include <linux/of_gpio.h> -#include <mach/tegra_wm8903_pdata.h> +#include <linux/platform_data/asoc-tegra_wm8903.h> #include <sound/core.h> #include <sound/jack.h>
Platform data for device drivers should be defined in include/linux/platform_data/*.h, not in the architecture and platform specific directories. This moves such data out of the tegra include directories Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Colin Cross <ccross@android.com> Cc: Olof Johansson <olof@lixom.net> Cc: Stephen Warren <swarren@wwwdotorg.org> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Chris Ball <cjb@laptop.org> Cc: Liam Girdwood <lrg@ti.com> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: linux-tegra@vger.kernel.org --- arch/arm/mach-tegra/board-harmony.c | 4 ++-- arch/arm/mach-tegra/board-paz00.c | 2 +- arch/arm/mach-tegra/board-trimslice.c | 2 +- drivers/input/keyboard/tegra-kbc.c | 2 +- drivers/mmc/host/sdhci-tegra.c | 2 +- .../linux/platform_data/asoc-tegra_wm8903.h | 0 .../mach/kbc.h => include/linux/platform_data/keyboard-tegra-kbc.h | 0 .../mach/sdhci.h => include/linux/platform_data/mmc-sdhci-tegra.h | 0 sound/soc/tegra/tegra_wm8903.c | 2 +- 9 files changed, 7 insertions(+), 7 deletions(-) rename arch/arm/mach-tegra/include/mach/tegra_wm8903_pdata.h => include/linux/platform_data/asoc-tegra_wm8903.h (100%) rename arch/arm/mach-tegra/include/mach/kbc.h => include/linux/platform_data/keyboard-tegra-kbc.h (100%) rename arch/arm/mach-tegra/include/mach/sdhci.h => include/linux/platform_data/mmc-sdhci-tegra.h (100%)