Re: [PATCH] vt_ioctl.c: fix compile error with pm_set_vt_switch()

From: Alan Cox
Date: Sat Sep 03 2011 - 06:47:58 EST


On Fri, 2 Sep 2011 14:02:42 -0700
H Hartley Sweeten <hartleys@xxxxxxxxxxxxxxxxxxx> wrote:

> When CONFIG_PM_SLEEP, CONFIG_VT, and CONFIG_VT_CONSOLE are not enabled
> the function pm_set_vt_switch() is defined as an inline in linux/suspend.h. This causes
> a compile error if CONFIG_VT is enabled.
>
> drivers/tty/vt/vt_ioctl.c:1794: error: redefinition of 'pm_set_vt_switch'
> include/linux/suspend.h:17: error: previous definition of 'pm_set_vt_switch' was here
>
> Fix this with an #if defined guard around the function in vt_ioctl.c.

Can you put the #if uglies into the buggy suspend.h header instead so the
code proper is kept clean of ifdefs.

Alan
--
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/