Hi Balbi, On Feb 6, 2008 7:40 AM, Felipe Balbi <me@xxxxxxxxxxxxxxx> wrote: > Hi, > > > On Wed, 6 Feb 2008 02:55:39 -0400, David Cohen <dacohen@xxxxxxxxx> wrote: > > If CONFIG_OMAP_MUX_DEBUG and CONFIG_OMAP_MUX_WARNING are not set, the > debug > > member is not declared on pin_config struct and should not be used on > > MUX_CFG_34XX macro. > > > > Signed-off-by: David Cohen <david.cohen@xxxxxxxxxxx> > > --- > > include/asm-arm/arch-omap/mux.h | 8 ++++++++ > > 1 files changed, 8 insertions(+), 0 deletions(-) > > > > diff --git a/include/asm-arm/arch-omap/mux.h > > b/include/asm-arm/arch-omap/mux.h > > index e5a96c3..fbdc6e5 100644 > > --- a/include/asm-arm/arch-omap/mux.h > > +++ b/include/asm-arm/arch-omap/mux.h > > @@ -166,12 +166,20 @@ > > #define OMAP34XX_PIN_OFF_INPUT_PULLDOWN (OMAP3_OFF_EN | > > OMAP3_OFF_PULL_EN) > > #define OMAP34XX_PIN_OFF_WAKEUPENABLE OMAP3_WAKEUP_EN > > > > +#if defined(CONFIG_OMAP_MUX_DEBUG) || defined(CONFIG_OMAP_MUX_WARNINGS) > > #define MUX_CFG_34XX(desc, reg_offset, mux_value){ \ > > .name = desc, \ > > .debug = 0, \ > > .mux_reg = reg_offset, \ > > .mux_val = mux_value \ > > }, > > +#else > > +#define MUX_CFG_34XX(desc, reg_offset, mux_value){ \ > > + .name = desc, \ > > + .mux_reg = reg_offset, \ > > + .mux_val = mux_value \ > > +}, > > +#endif > > I'd rather: > > diff --git a/include/asm-arm/arch-omap/mux.h > b/include/asm-arm/arch-omap/mux.h > index e5a96c3..1a996a7 100644 > --- a/include/asm-arm/arch-omap/mux.h > +++ b/include/asm-arm/arch-omap/mux.h > @@ -195,10 +195,8 @@ struct pin_config { > const unsigned char pu_pd_val; > #endif > > -#if defined(CONFIG_OMAP_MUX_DEBUG) || defined(CONFIG_OMAP_MUX_WARNINGS) > unsigned char debug; > const char *mux_reg_name; > -#endif > > } > > since these fields are not used if debug and warning are not selected. > Leaving them in the structure would also allow > us to propose a patch for turning on and off mux debug on runtime, > something that I really like. > > What do you say? But mux is done at boot time. I don't think you'll need to change it after that. Some times it's not even the kernel who did it, but bootloader earlier. Regards, David Cohen > > > > > struct pin_config { > > char *name; > > -- > > 1.5.4 > > > > - > > To unsubscribe from this list: send the line "unsubscribe linux-omap" in > > the body of a message to majordomo@xxxxxxxxxxxxxxx > > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- > Best Regards, > > Felipe Balbi > http://felipebalbi.com > me@xxxxxxxxxxxxxxx > > - To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html