From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Walleij Subject: Re: [PATCH 5/7] staging: media/lirc: switch to use gpiolib Date: Fri, 20 Sep 2013 21:28:02 +0200 Message-ID: References: <1378816283-8164-1-git-send-email-linus.walleij@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from mail-ob0-f181.google.com ([209.85.214.181]:42301 "EHLO mail-ob0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753160Ab3ITT2E (ORCPT ); Fri, 20 Sep 2013 15:28:04 -0400 Received: by mail-ob0-f181.google.com with SMTP id gq1so1078919obb.40 for ; Fri, 20 Sep 2013 12:28:03 -0700 (PDT) In-Reply-To: Sender: linux-gpio-owner@vger.kernel.org List-Id: linux-gpio@vger.kernel.org To: Krzysztof Halasa Cc: "linux-gpio@vger.kernel.org" , Imre Kaloz , Greg Kroah-Hartman , Alexandre Courbot , "linux-arm-kernel@lists.infradead.org" On Fri, Sep 13, 2013 at 2:15 PM, Krzysztof Halasa wrote: > Linus Walleij writes: > >> +++ b/drivers/staging/media/lirc/lirc_serial.c >> @@ -839,6 +839,16 @@ static int lirc_serial_probe(struct platform_device *dev) >> { >> int i, nlow, nhigh, result; >> >> +#ifdef CONFIG_LIRC_SERIAL_NSLU2 >> + /* This GPIO is used for a LED on the NSLU2 */ >> + result = devm_gpio_request(dev, NSLU2_LED_GRN, "lirc-serial"); > > Will this succeed with the LED driver already loaded? Should the user > unload it first? Hm if this driver should use this as a LED it needs to register a trigger for that GPIO LED instead. A GPIO can not be used by two consumers at the same time... Yours, Linus Walleij