Skip to contentSkip to conversation

omap: zoom2: fix build break when CONFIG_WL12XX_PLATFORM_DATA=n

PATCH In review Anand Gadiyar 3 participants 4 messages Oct 1, 2010 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 omap: zoom2: fix build break when CONFIG_WL12XX_PLATFORM_DATA=n

Fix this build break when CONFIG_WL12XX_PLATFORM_DATA is not set.

LD .tmp_vmlinux1
arch/arm/mach-omap2/built-in.o: In function `zoom_peripherals_init':
/home/userdata/a0393673/kernels/mainline/linux-2.6/arch/arm/mach-omap2/board-zoom-peripherals.c:333: undefined reference to `wl12xx_set_platform_data'
make: *** [.tmp_vmlinux1] Error 1

Cc Ohad Ben-Cohen <[email protected]>
Cc Tony Lindgren <[email protected]>

---
There are still many warnings about the function wl12xx_set_platform_data being unused. Haven't fixed those. Ohad, care to take a look?

 include/linux/wl12xx.h |    7 +++++++
 1 file changed, 7 insertions(+)
include/linux/wl12xx.h +7 -0
Index: linux-2.6/include/linux/wl12xx.h
===================================================================
@@ -32,7 +32,14 @@ struct wl12xx_platform_data {
 	int board_ref_clock;
 };
 
+#ifdef CONFIG_WL12XX_PLATFORM_DATA
 int wl12xx_set_platform_data(const struct wl12xx_platform_data *data);
+#else
+static int wl12xx_set_platform_data(const struct wl12xx_platform_data *data)
+{
+	return 0;
+}
+#endif
 const struct wl12xx_platform_data *wl12xx_get_platform_data(void);
 
 #endif

A message that is not in the archive (sent off-list or not yet received): 1285965236-17907-1-git-send-email-gadiyar-l0cyMroinI0@public.gmane.org

#2 lore raw
Quoted 1 line · Anand Gadiyar

Fix this build break when CONFIG_WL12XX_PLATFORM_DATA is not set.

A similar fix was already submitted and is pending to be merged
(http://permalink.gmane.org/gmane.linux.kernel.wireless.general/56595)

Quoted 2 lines

There are still many warnings about the function wl12xx_set_platform_data being unused. Haven't fixed those. Ohad, care to take a look?

Sure. Which warnings do you refer to (I haven't seen any) ?

Thanks,
Ohad.

Quoted 14 lines

 include/linux/wl12xx.h |    7 +++++++

 1 file changed, 7 insertions(+)

Index: linux-2.6/include/linux/wl12xx.h
===================================================================

include/linux/wl12xx.h +1 -0
@@ -32,7 +32,14 @@ struct wl12xx_platform_data {
        int board_ref_clock;
  };
 
+#ifdef CONFIG_WL12XX_PLATFORM_DATA

include/linux/wl12xx.h struct wl12xx_platform_data { · line 45

Quoted 10 lines
include/linux/wl12xx.h +6 -0
  int wl12xx_set_platform_data(const struct wl12xx_platform_data *data);
+#else
+static int wl12xx_set_platform_data(const struct wl12xx_platform_data *data)
+{
+       return 0;
+}
+#endif
  const struct wl12xx_platform_data *wl12xx_get_platform_data(void);
 
  #endif

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw
Quoted 7 lines · Ohad Ben-Cohen
Quoted 1 line · Anand Gadiyar

Fix this build break when CONFIG_WL12XX_PLATFORM_DATA is not set.

A similar fix was already submitted and is pending to be merged
(http://permalink.gmane.org/gmane.linux.kernel.wireless.general/56595)

Quoted 1 line

There are still many warnings about the function

wl12xx_set_platform_data

Quoted 4 lines
Quoted 1 line

being unused. Haven't fixed those. Ohad, care to take a look?

Sure. Which warnings do you refer to (I haven't seen any) ?

I picked up your patch and the warnings are gone. The key difference was I missed marking the alternative function as an inline.

Without that, I was seeing warnings like these:
include/linux/wl12xx.h:42: warning: 'wl12xx_set_platform_data' defined but not used

- Anand

#4 lore raw
Quoted 2 lines · Anand Gadiyar

I picked up your patch and the warnings are gone. The key difference was I missed marking the alternative function as an inline.

Ok, thanks for the update.

Quoted 7 lines

Without that, I was seeing warnings like these:
include/linux/wl12xx.h:42: warning: 'wl12xx_set_platform_data' defined but not used

- Anand