[PATCH v2] iwlegacy: il_pm_ops is only provided for PM_SLEEP

From: Arnd Bergmann
Date: Sat Jun 01 2013 - 05:12:47 EST


This makes sure the conditionals for the declaration match the
definition, so we provide the alternative

#else
#define IL_LEGACY_PM_OPS NULL
#endif

in the correct cases. As suggested by Borislav Petkov, this removes
the comments for the #else and #endif lines.

drivers/built-in.o:(.data+0x57974): undefined reference to `il_pm_ops'

Cc: Johannes Berg <johannes.berg@xxxxxxxxx>
Cc: John W. Linville <linville@xxxxxxxxxxxxx>
Cc: Borislav Petkov <bp@xxxxxxxxx>
Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
---
v2: Fixed the obvious bug pointed out by Brian Norris, and actually
build-tested the new version.

diff --git a/drivers/net/wireless/iwlegacy/common.h b/drivers/net/wireless/iwlegacy/common.h
index f8246f2..f043092 100644
--- a/drivers/net/wireless/iwlegacy/common.h
+++ b/drivers/net/wireless/iwlegacy/common.h
@@ -1832,16 +1832,16 @@ u32 il_usecs_to_beacons(struct il_priv *il, u32 usec, u32 beacon_interval);
__le32 il_add_beacon_time(struct il_priv *il, u32 base, u32 addon,
u32 beacon_interval);

-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
extern const struct dev_pm_ops il_pm_ops;

#define IL_LEGACY_PM_OPS (&il_pm_ops)

-#else /* !CONFIG_PM */
+#else

#define IL_LEGACY_PM_OPS NULL

-#endif /* !CONFIG_PM */
+#endif

/*****************************************************
* Error Handling Debugging

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/