Re: [PATCH] pda_power: fix build error if !CONFIG_USB_OTG_UTILS

From: Anton Vorontsov
Date: Tue Aug 23 2011 - 09:30:19 EST


On Tue, Aug 23, 2011 at 08:34:33PM +0800, Axel Lin wrote:
> commit 9ad63986c606c60e2e916b1b96f22991f966d9cc
> "pda_power: Add support for using otg transceiver events"
> introduces below build error if !CONFIG_USB_OTG_UTILS.
>
> CC drivers/power/pda_power.o
> drivers/power/pda_power.c: In function 'pda_power_probe':
> drivers/power/pda_power.c:322: error: 'otg_is_usb_online' undeclared (first use in this function)
> drivers/power/pda_power.c:322: error: (Each undeclared identifier is reported only once
> drivers/power/pda_power.c:322: error: for each function it appears in.)
> drivers/power/pda_power.c:325: error: 'otg_is_ac_online' undeclared (first use in this function)
> drivers/power/pda_power.c:371: error: 'otg_handle_notification' undeclared (first use in this function)
> make[2]: *** [drivers/power/pda_power.o] Error 1
> make[1]: *** [drivers/power] Error 2
> make: *** [drivers] Error 2
>
> This patch adds #ifdef CONFIG_USB_OTG_UTILS guards at necessary places to fix
> build errors.
>
> Signed-off-by: Axel Lin <axel.lin@xxxxxxxxx>
> ---

Applied, thanks!

Dima,

I wonder if it is possible to get rid of most #ifdefs by moving
the pda_power's USB_OTG stuff into a function?

Thanks,

--
Anton Vorontsov
Email: cbouatmailru@xxxxxxxxx
--
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/