* [PATCH] omap: fix build when MTD_NAND_OMAP2 and TOUCHSCREEN_ADS7846 are disabled
@ 2011-05-04 13:27 ` Mike Rapoport
0 siblings, 0 replies; 10+ messages in thread
From: Mike Rapoport @ 2011-05-04 13:27 UTC (permalink / raw)
To: Tony Lindgren; +Cc: linux-omap, linux-arm-kernel, Mike Rapoport, Oleg Drokin
Commits 5e6a64b36ce346b7a2d481ef9fa315290eb28e5e (omap: move detection of
NAND CS to common-board-devices) and 96974a249b0cf3537f49115a59be67e2c54f315c
(omap: consolidate touch screen initialization among different boards)
break compilation when CONFIG_MTD_NAND_OMAP2 and
CONFIG_TOUCHSCREEN_ADS7846 are not selected.
Removing ifdefs and stubs from common-board-devices.h fixes the problem.
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
CC: Oleg Drokin <green@linuxhacker.ru>
---
17 more lines are gone ;-)
arch/arm/mach-omap2/common-board-devices.h | 17 -----------------
1 files changed, 0 insertions(+), 17 deletions(-)
diff --git a/arch/arm/mach-omap2/common-board-devices.h b/arch/arm/mach-omap2/common-board-devices.h
index ca03abf..eb80b3b 100644
--- a/arch/arm/mach-omap2/common-board-devices.h
+++ b/arch/arm/mach-omap2/common-board-devices.h
@@ -26,27 +26,10 @@ static inline void omap4_pmic_init(const char *pmic_type,
omap_pmic_init(1, 400, pmic_type, OMAP44XX_IRQ_SYS_1N, pmic_data);
}
-#if defined(CONFIG_TOUCHSCREEN_ADS7846) || \
- defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
struct ads7846_platform_data;
void omap_ads7846_init(int bus_num, int gpio_pendown, int gpio_debounce,
struct ads7846_platform_data *board_pdata);
-#else
-static inline void omap_ads7846_init(int bus_num,
- int gpio_pendown, int gpio_debounce,
- struct ads7846_platform_data *board_data)
-{
-}
-#endif
-
-#if defined(CONFIG_MTD_NAND_OMAP2) || defined(CONFIG_MTD_NAND_OMAP2_MODULE)
void omap_nand_flash_init(int opts, struct mtd_partition *parts, int n_parts);
-#else
-static inline void omap_nand_flash_init(int opts, struct mtd_partition *parts,
- int nr_parts)
-{
-}
-#endif
#endif /* __OMAP_COMMON_BOARD_DEVICES__ */
--
1.7.3.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH] omap: fix build when MTD_NAND_OMAP2 and TOUCHSCREEN_ADS7846 are disabled
@ 2011-05-04 13:27 ` Mike Rapoport
0 siblings, 0 replies; 10+ messages in thread
From: Mike Rapoport @ 2011-05-04 13:27 UTC (permalink / raw)
To: linux-arm-kernel
Commits 5e6a64b36ce346b7a2d481ef9fa315290eb28e5e (omap: move detection of
NAND CS to common-board-devices) and 96974a249b0cf3537f49115a59be67e2c54f315c
(omap: consolidate touch screen initialization among different boards)
break compilation when CONFIG_MTD_NAND_OMAP2 and
CONFIG_TOUCHSCREEN_ADS7846 are not selected.
Removing ifdefs and stubs from common-board-devices.h fixes the problem.
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
CC: Oleg Drokin <green@linuxhacker.ru>
---
17 more lines are gone ;-)
arch/arm/mach-omap2/common-board-devices.h | 17 -----------------
1 files changed, 0 insertions(+), 17 deletions(-)
diff --git a/arch/arm/mach-omap2/common-board-devices.h b/arch/arm/mach-omap2/common-board-devices.h
index ca03abf..eb80b3b 100644
--- a/arch/arm/mach-omap2/common-board-devices.h
+++ b/arch/arm/mach-omap2/common-board-devices.h
@@ -26,27 +26,10 @@ static inline void omap4_pmic_init(const char *pmic_type,
omap_pmic_init(1, 400, pmic_type, OMAP44XX_IRQ_SYS_1N, pmic_data);
}
-#if defined(CONFIG_TOUCHSCREEN_ADS7846) || \
- defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
struct ads7846_platform_data;
void omap_ads7846_init(int bus_num, int gpio_pendown, int gpio_debounce,
struct ads7846_platform_data *board_pdata);
-#else
-static inline void omap_ads7846_init(int bus_num,
- int gpio_pendown, int gpio_debounce,
- struct ads7846_platform_data *board_data)
-{
-}
-#endif
-
-#if defined(CONFIG_MTD_NAND_OMAP2) || defined(CONFIG_MTD_NAND_OMAP2_MODULE)
void omap_nand_flash_init(int opts, struct mtd_partition *parts, int n_parts);
-#else
-static inline void omap_nand_flash_init(int opts, struct mtd_partition *parts,
- int nr_parts)
-{
-}
-#endif
#endif /* __OMAP_COMMON_BOARD_DEVICES__ */
--
1.7.3.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] omap: fix build when MTD_NAND_OMAP2 and TOUCHSCREEN_ADS7846 are disabled
2011-05-04 13:27 ` Mike Rapoport
@ 2011-05-04 16:02 ` Oleg Drokin
-1 siblings, 0 replies; 10+ messages in thread
From: Oleg Drokin @ 2011-05-04 16:02 UTC (permalink / raw)
To: Mike Rapoport; +Cc: Tony Lindgren, linux-omap, linux-arm-kernel
Hello!
On May 4, 2011, at 9:27 AM, Mike Rapoport wrote:
> Commits 5e6a64b36ce346b7a2d481ef9fa315290eb28e5e (omap: move detection of
> NAND CS to common-board-devices) and 96974a249b0cf3537f49115a59be67e2c54f315c
> (omap: consolidate touch screen initialization among different boards)
> break compilation when CONFIG_MTD_NAND_OMAP2 and
> CONFIG_TOUCHSCREEN_ADS7846 are not selected.
> Removing ifdefs and stubs from common-board-devices.h fixes the problem.
Works for me.
Bye,
Oleg
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] omap: fix build when MTD_NAND_OMAP2 and TOUCHSCREEN_ADS7846 are disabled
@ 2011-05-04 16:02 ` Oleg Drokin
0 siblings, 0 replies; 10+ messages in thread
From: Oleg Drokin @ 2011-05-04 16:02 UTC (permalink / raw)
To: linux-arm-kernel
Hello!
On May 4, 2011, at 9:27 AM, Mike Rapoport wrote:
> Commits 5e6a64b36ce346b7a2d481ef9fa315290eb28e5e (omap: move detection of
> NAND CS to common-board-devices) and 96974a249b0cf3537f49115a59be67e2c54f315c
> (omap: consolidate touch screen initialization among different boards)
> break compilation when CONFIG_MTD_NAND_OMAP2 and
> CONFIG_TOUCHSCREEN_ADS7846 are not selected.
> Removing ifdefs and stubs from common-board-devices.h fixes the problem.
Works for me.
Bye,
Oleg
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] omap: fix build when MTD_NAND_OMAP2 and TOUCHSCREEN_ADS7846 are disabled
2011-05-04 16:02 ` Oleg Drokin
@ 2011-05-06 7:25 ` Tony Lindgren
-1 siblings, 0 replies; 10+ messages in thread
From: Tony Lindgren @ 2011-05-06 7:25 UTC (permalink / raw)
To: Oleg Drokin; +Cc: Mike Rapoport, linux-omap, linux-arm-kernel
* Oleg Drokin <green@linuxhacker.ru> [110504 08:59]:
> Hello!
>
> On May 4, 2011, at 9:27 AM, Mike Rapoport wrote:
>
> > Commits 5e6a64b36ce346b7a2d481ef9fa315290eb28e5e (omap: move detection of
> > NAND CS to common-board-devices) and 96974a249b0cf3537f49115a59be67e2c54f315c
> > (omap: consolidate touch screen initialization among different boards)
> > break compilation when CONFIG_MTD_NAND_OMAP2 and
> > CONFIG_TOUCHSCREEN_ADS7846 are not selected.
> > Removing ifdefs and stubs from common-board-devices.h fixes the problem.
>
> Works for me.
We should not build in code unnecessarily unless the boards has
ads7847. Many boards don't have it.
So how about do the ifdef optimization for ads7846_spi_board_info
and omap_ads7846_init in common-board-devices.c?
That keeps the header clean and the we have all the code in one
place in a way where it's optimized out if not selected.
Regards,
Tony
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] omap: fix build when MTD_NAND_OMAP2 and TOUCHSCREEN_ADS7846 are disabled
@ 2011-05-06 7:25 ` Tony Lindgren
0 siblings, 0 replies; 10+ messages in thread
From: Tony Lindgren @ 2011-05-06 7:25 UTC (permalink / raw)
To: linux-arm-kernel
* Oleg Drokin <green@linuxhacker.ru> [110504 08:59]:
> Hello!
>
> On May 4, 2011, at 9:27 AM, Mike Rapoport wrote:
>
> > Commits 5e6a64b36ce346b7a2d481ef9fa315290eb28e5e (omap: move detection of
> > NAND CS to common-board-devices) and 96974a249b0cf3537f49115a59be67e2c54f315c
> > (omap: consolidate touch screen initialization among different boards)
> > break compilation when CONFIG_MTD_NAND_OMAP2 and
> > CONFIG_TOUCHSCREEN_ADS7846 are not selected.
> > Removing ifdefs and stubs from common-board-devices.h fixes the problem.
>
> Works for me.
We should not build in code unnecessarily unless the boards has
ads7847. Many boards don't have it.
So how about do the ifdef optimization for ads7846_spi_board_info
and omap_ads7846_init in common-board-devices.c?
That keeps the header clean and the we have all the code in one
place in a way where it's optimized out if not selected.
Regards,
Tony
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2] omap: fix build when MTD_NAND_OMAP2 and TOUCHSCREEN_ADS7846 are disabled
2011-05-06 7:25 ` Tony Lindgren
@ 2011-05-06 19:58 ` Mike Rapoport
-1 siblings, 0 replies; 10+ messages in thread
From: Mike Rapoport @ 2011-05-06 19:58 UTC (permalink / raw)
To: Tony Lindgren; +Cc: linux-omap, linux-arm-kernel, Mike Rapoport, Oleg Drokin
Commits 5e6a64b36ce346b7a2d481ef9fa315290eb28e5e (omap: move detection of
NAND CS to common-board-devices) and 96974a249b0cf3537f49115a59be67e2c54f315c
(omap: consolidate touch screen initialization among different boards)
break compilation when CONFIG_MTD_NAND_OMAP2 and
CONFIG_TOUCHSCREEN_ADS7846 are not selected.
Removing ifdefs and stubs from common-board-devices.h fixes the problem.
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
CC: Oleg Drokin <green@linuxhacker.ru>
---
Hope this one is better.
arch/arm/mach-omap2/common-board-devices.c | 15 +++++++++++++++
arch/arm/mach-omap2/common-board-devices.h | 17 -----------------
2 files changed, 15 insertions(+), 17 deletions(-)
diff --git a/arch/arm/mach-omap2/common-board-devices.c b/arch/arm/mach-omap2/common-board-devices.c
index d57c71d..e94903b 100644
--- a/arch/arm/mach-omap2/common-board-devices.c
+++ b/arch/arm/mach-omap2/common-board-devices.c
@@ -50,6 +50,8 @@ void __init omap_pmic_init(int bus, u32 clkrate,
omap_register_i2c_bus(bus, clkrate, &pmic_i2c_board_info, 1);
}
+#if defined(CONFIG_TOUCHSCREEN_ADS7846) || \
+ defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
static struct omap2_mcspi_device_config ads7846_mcspi_config = {
.turbo_mode = 0,
.single_channel = 1, /* 0: slave, 1: master */
@@ -105,7 +107,14 @@ void __init omap_ads7846_init(int bus_num, int gpio_pendown, int gpio_debounce,
spi_register_board_info(&ads7846_spi_board_info, 1);
}
+#else
+void __init omap_ads7846_init(int bus_num, int gpio_pendown, int gpio_debounce,
+ struct ads7846_platform_data *board_pdata)
+{
+}
+#endif
+#if defined(CONFIG_MTD_NAND_OMAP2) || defined(CONFIG_MTD_NAND_OMAP2_MODULE)
static struct omap_nand_platform_data nand_data = {
.dma_channel = -1, /* disable DMA in OMAP NAND driver */
};
@@ -146,3 +155,9 @@ void __init omap_nand_flash_init(int options, struct mtd_partition *parts,
printk(KERN_ERR "Unable to register NAND device\n");
}
}
+#else
+void __init omap_nand_flash_init(int options, struct mtd_partition *parts,
+ int nr_parts)
+{
+}
+#endif
diff --git a/arch/arm/mach-omap2/common-board-devices.h b/arch/arm/mach-omap2/common-board-devices.h
index ca03abf..eb80b3b 100644
--- a/arch/arm/mach-omap2/common-board-devices.h
+++ b/arch/arm/mach-omap2/common-board-devices.h
@@ -26,27 +26,10 @@ static inline void omap4_pmic_init(const char *pmic_type,
omap_pmic_init(1, 400, pmic_type, OMAP44XX_IRQ_SYS_1N, pmic_data);
}
-#if defined(CONFIG_TOUCHSCREEN_ADS7846) || \
- defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
struct ads7846_platform_data;
void omap_ads7846_init(int bus_num, int gpio_pendown, int gpio_debounce,
struct ads7846_platform_data *board_pdata);
-#else
-static inline void omap_ads7846_init(int bus_num,
- int gpio_pendown, int gpio_debounce,
- struct ads7846_platform_data *board_data)
-{
-}
-#endif
-
-#if defined(CONFIG_MTD_NAND_OMAP2) || defined(CONFIG_MTD_NAND_OMAP2_MODULE)
void omap_nand_flash_init(int opts, struct mtd_partition *parts, int n_parts);
-#else
-static inline void omap_nand_flash_init(int opts, struct mtd_partition *parts,
- int nr_parts)
-{
-}
-#endif
#endif /* __OMAP_COMMON_BOARD_DEVICES__ */
--
1.7.3.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v2] omap: fix build when MTD_NAND_OMAP2 and TOUCHSCREEN_ADS7846 are disabled
@ 2011-05-06 19:58 ` Mike Rapoport
0 siblings, 0 replies; 10+ messages in thread
From: Mike Rapoport @ 2011-05-06 19:58 UTC (permalink / raw)
To: linux-arm-kernel
Commits 5e6a64b36ce346b7a2d481ef9fa315290eb28e5e (omap: move detection of
NAND CS to common-board-devices) and 96974a249b0cf3537f49115a59be67e2c54f315c
(omap: consolidate touch screen initialization among different boards)
break compilation when CONFIG_MTD_NAND_OMAP2 and
CONFIG_TOUCHSCREEN_ADS7846 are not selected.
Removing ifdefs and stubs from common-board-devices.h fixes the problem.
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
CC: Oleg Drokin <green@linuxhacker.ru>
---
Hope this one is better.
arch/arm/mach-omap2/common-board-devices.c | 15 +++++++++++++++
arch/arm/mach-omap2/common-board-devices.h | 17 -----------------
2 files changed, 15 insertions(+), 17 deletions(-)
diff --git a/arch/arm/mach-omap2/common-board-devices.c b/arch/arm/mach-omap2/common-board-devices.c
index d57c71d..e94903b 100644
--- a/arch/arm/mach-omap2/common-board-devices.c
+++ b/arch/arm/mach-omap2/common-board-devices.c
@@ -50,6 +50,8 @@ void __init omap_pmic_init(int bus, u32 clkrate,
omap_register_i2c_bus(bus, clkrate, &pmic_i2c_board_info, 1);
}
+#if defined(CONFIG_TOUCHSCREEN_ADS7846) || \
+ defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
static struct omap2_mcspi_device_config ads7846_mcspi_config = {
.turbo_mode = 0,
.single_channel = 1, /* 0: slave, 1: master */
@@ -105,7 +107,14 @@ void __init omap_ads7846_init(int bus_num, int gpio_pendown, int gpio_debounce,
spi_register_board_info(&ads7846_spi_board_info, 1);
}
+#else
+void __init omap_ads7846_init(int bus_num, int gpio_pendown, int gpio_debounce,
+ struct ads7846_platform_data *board_pdata)
+{
+}
+#endif
+#if defined(CONFIG_MTD_NAND_OMAP2) || defined(CONFIG_MTD_NAND_OMAP2_MODULE)
static struct omap_nand_platform_data nand_data = {
.dma_channel = -1, /* disable DMA in OMAP NAND driver */
};
@@ -146,3 +155,9 @@ void __init omap_nand_flash_init(int options, struct mtd_partition *parts,
printk(KERN_ERR "Unable to register NAND device\n");
}
}
+#else
+void __init omap_nand_flash_init(int options, struct mtd_partition *parts,
+ int nr_parts)
+{
+}
+#endif
diff --git a/arch/arm/mach-omap2/common-board-devices.h b/arch/arm/mach-omap2/common-board-devices.h
index ca03abf..eb80b3b 100644
--- a/arch/arm/mach-omap2/common-board-devices.h
+++ b/arch/arm/mach-omap2/common-board-devices.h
@@ -26,27 +26,10 @@ static inline void omap4_pmic_init(const char *pmic_type,
omap_pmic_init(1, 400, pmic_type, OMAP44XX_IRQ_SYS_1N, pmic_data);
}
-#if defined(CONFIG_TOUCHSCREEN_ADS7846) || \
- defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
struct ads7846_platform_data;
void omap_ads7846_init(int bus_num, int gpio_pendown, int gpio_debounce,
struct ads7846_platform_data *board_pdata);
-#else
-static inline void omap_ads7846_init(int bus_num,
- int gpio_pendown, int gpio_debounce,
- struct ads7846_platform_data *board_data)
-{
-}
-#endif
-
-#if defined(CONFIG_MTD_NAND_OMAP2) || defined(CONFIG_MTD_NAND_OMAP2_MODULE)
void omap_nand_flash_init(int opts, struct mtd_partition *parts, int n_parts);
-#else
-static inline void omap_nand_flash_init(int opts, struct mtd_partition *parts,
- int nr_parts)
-{
-}
-#endif
#endif /* __OMAP_COMMON_BOARD_DEVICES__ */
--
1.7.3.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v2] omap: fix build when MTD_NAND_OMAP2 and TOUCHSCREEN_ADS7846 are disabled
2011-05-06 19:58 ` Mike Rapoport
@ 2011-05-09 15:19 ` Tony Lindgren
-1 siblings, 0 replies; 10+ messages in thread
From: Tony Lindgren @ 2011-05-09 15:19 UTC (permalink / raw)
To: Mike Rapoport; +Cc: linux-omap, linux-arm-kernel, Oleg Drokin
* Mike Rapoport <mike@compulab.co.il> [110506 12:54]:
> Commits 5e6a64b36ce346b7a2d481ef9fa315290eb28e5e (omap: move detection of
> NAND CS to common-board-devices) and 96974a249b0cf3537f49115a59be67e2c54f315c
> (omap: consolidate touch screen initialization among different boards)
> break compilation when CONFIG_MTD_NAND_OMAP2 and
> CONFIG_TOUCHSCREEN_ADS7846 are not selected.
> Removing ifdefs and stubs from common-board-devices.h fixes the problem.
>
> Signed-off-by: Mike Rapoport <mike@compulab.co.il>
> CC: Oleg Drokin <green@linuxhacker.ru>
> ---
> Hope this one is better.
Thanks, I'll fold this into your original patch.
Tony
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2] omap: fix build when MTD_NAND_OMAP2 and TOUCHSCREEN_ADS7846 are disabled
@ 2011-05-09 15:19 ` Tony Lindgren
0 siblings, 0 replies; 10+ messages in thread
From: Tony Lindgren @ 2011-05-09 15:19 UTC (permalink / raw)
To: linux-arm-kernel
* Mike Rapoport <mike@compulab.co.il> [110506 12:54]:
> Commits 5e6a64b36ce346b7a2d481ef9fa315290eb28e5e (omap: move detection of
> NAND CS to common-board-devices) and 96974a249b0cf3537f49115a59be67e2c54f315c
> (omap: consolidate touch screen initialization among different boards)
> break compilation when CONFIG_MTD_NAND_OMAP2 and
> CONFIG_TOUCHSCREEN_ADS7846 are not selected.
> Removing ifdefs and stubs from common-board-devices.h fixes the problem.
>
> Signed-off-by: Mike Rapoport <mike@compulab.co.il>
> CC: Oleg Drokin <green@linuxhacker.ru>
> ---
> Hope this one is better.
Thanks, I'll fold this into your original patch.
Tony
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2011-05-09 15:19 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-04 13:27 [PATCH] omap: fix build when MTD_NAND_OMAP2 and TOUCHSCREEN_ADS7846 are disabled Mike Rapoport
2011-05-04 13:27 ` Mike Rapoport
2011-05-04 16:02 ` Oleg Drokin
2011-05-04 16:02 ` Oleg Drokin
2011-05-06 7:25 ` Tony Lindgren
2011-05-06 7:25 ` Tony Lindgren
2011-05-06 19:58 ` [PATCH v2] " Mike Rapoport
2011-05-06 19:58 ` Mike Rapoport
2011-05-09 15:19 ` Tony Lindgren
2011-05-09 15:19 ` Tony Lindgren
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.