At Fri, 6 Feb 2015 08:51:10 -0600, Chris Rorvick wrote: > > It is unlikely this function would ever be used in a context without a > pointer to a `struct usb_line6_toneport', so grab the device type from > it rather than having the caller do it. > > Signed-off-by: Chris Rorvick <ch...@rorvick.com> > --- > sound/usb/line6/toneport.c | 19 ++++++++++++------- > 1 file changed, 12 insertions(+), 7 deletions(-) > > diff --git a/sound/usb/line6/toneport.c b/sound/usb/line6/toneport.c > index de56180a..b2c0b2c 100644 > --- a/sound/usb/line6/toneport.c > +++ b/sound/usb/line6/toneport.c > @@ -278,12 +278,17 @@ static struct snd_kcontrol_new toneport_control_source > = { > (void cmd_0x02(byte red, byte green) > */ > > -static bool toneport_has_led(enum line6_device_type type) > +static bool toneport_has_led(struct usb_line6_toneport *toneport) > { > - return > - (type == LINE6_GUITARPORT) || > - (type == LINE6_TONEPORT_GX); > + switch (toneport->type) { > + case LINE6_GUITARPORT: > + case LINE6_TONEPORT_GX: > /* add your device here if you are missing support for the LEDs */ > + return 1; > + > + default: > + return 0;
Please use true and false. Takashi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/