On Tuesday 12 June 2012 04:08:05 Felipe Balbi wrote: > On Sun, Jun 10, 2012 at 11:16:25PM -0400, Mike Frysinger wrote: > > On Tue, Jun 5, 2012 at 7:30 AM, Felipe Balbi <balbi@xxxxxx> wrote: > > > On Wed, May 30, 2012 at 02:11:17PM +0800, Bob Liu wrote: > > >> --- a/drivers/usb/musb/blackfin.h > > >> +++ b/drivers/usb/musb/blackfin.h > > >> @@ -84,4 +84,10 @@ static void dump_fifo_data(u8 *buf, u16 len) > > >> > > >> static struct timer_list musb_conn_timer; > > >> > > >> +#ifndef CONFIG_BF60x > > >> +#define vrsel_set_value(val) gpio_set_value(musb->config->gpio_vrsel, > > >> val) +#else > > >> +#define vrsel_set_value(val) do { } while (0) > > >> +#endif > > > > > > this obfuscation is unnacceptable and it won't even work if you want to > > > have support for both blackfins on the same kernel. > > > > there are no plans to do that, and a lot more fundamental stuff would > > have to be sorted out before that could even be considered > > Still not taking it. It's just not right. Use a flag at least and don't > hide common frameworks under a macro. doesn't that add pointless runtime bloat for checking a flag that's always set/cleared for the targets ? for the structure in question, there is no gpio field for BF60x, so it has to be protected by an ifdef else we get a compile error. -mike
Attachment:
signature.asc
Description: This is a digitally signed message part.