Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757346AbbBFO4R (ORCPT ); Fri, 6 Feb 2015 09:56:17 -0500 Received: from cantor2.suse.de ([195.135.220.15]:47432 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755844AbbBFO4Q (ORCPT ); Fri, 6 Feb 2015 09:56:16 -0500 Date: Fri, 06 Feb 2015 15:56:15 +0100 Message-ID: From: Takashi Iwai To: Chris Rorvick Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Stefan Hajnoczi Subject: Re: [PATCH 1/4] ALSA: line6: Add toneport_has_source_select() In-Reply-To: <1423234272-7348-2-git-send-email-chris@rorvick.com> References: <1423234272-7348-1-git-send-email-chris@rorvick.com> <1423234272-7348-2-git-send-email-chris@rorvick.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/24.4 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1217 Lines: 40 At Fri, 6 Feb 2015 08:51:09 -0600, Chris Rorvick wrote: > > Add a predicate for testing if the device supports source selection to > make the conditional logic around this a bit cleaner. > > Signed-off-by: Chris Rorvick > --- > sound/usb/line6/toneport.c | 32 ++++++++++++++++---------------- > 1 file changed, 16 insertions(+), 16 deletions(-) > > diff --git a/sound/usb/line6/toneport.c b/sound/usb/line6/toneport.c > index b107cf4..de56180a 100644 > --- a/sound/usb/line6/toneport.c > +++ b/sound/usb/line6/toneport.c > @@ -343,6 +343,20 @@ static void toneport_remove_leds(struct usb_line6_toneport *toneport) > } > } > > +static bool toneport_has_source_select(struct usb_line6_toneport *toneport) > +{ > + switch (toneport->type) { > + case LINE6_TONEPORT_UX1: > + case LINE6_TONEPORT_UX2: > + case LINE6_PODSTUDIO_UX1: > + case LINE6_PODSTUDIO_UX2: > + 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 majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/