提交 d94d3dff 编写于 作者: A Andrew Morton 提交者: Len Brown

ACPI: bay: fix build warning

drivers/acpi/bay.c: In function 'bay_add':
drivers/acpi/bay.c:310: warning: statement with no effect

Fix it by rewriting those macros in C.  Much nicer.

Cc: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLen Brown <len.brown@intel.com>
上级 a74388e2
...@@ -122,10 +122,24 @@ extern int register_hotplug_dock_device(acpi_handle handle, ...@@ -122,10 +122,24 @@ extern int register_hotplug_dock_device(acpi_handle handle,
acpi_notify_handler handler, void *context); acpi_notify_handler handler, void *context);
extern void unregister_hotplug_dock_device(acpi_handle handle); extern void unregister_hotplug_dock_device(acpi_handle handle);
#else #else
#define is_dock_device(h) (0) static inline int is_dock_device(acpi_handle handle)
#define register_dock_notifier(nb) (-ENODEV) {
#define unregister_dock_notifier(nb) do { } while(0) return 0;
#define register_hotplug_dock_device(h1, h2, c) (-ENODEV) }
#define unregister_hotplug_dock_device(h) do { } while(0) static inline int register_dock_notifier(struct notifier_block *nb)
{
return -ENODEV;
}
static inline void unregister_dock_notifier(struct notifier_block *nb)
{
}
static inline int register_hotplug_dock_device(acpi_handle handle,
acpi_notify_handler handler, void *context)
{
return -ENODEV;
}
static inline void unregister_hotplug_dock_device(acpi_handle handle)
{
}
#endif #endif
#endif /*__ACPI_DRIVERS_H__*/ #endif /*__ACPI_DRIVERS_H__*/
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册