Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756527Ab3CMR2y (ORCPT ); Wed, 13 Mar 2013 13:28:54 -0400 Received: from mail-la0-f51.google.com ([209.85.215.51]:65329 "EHLO mail-la0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756437Ab3CMR2w (ORCPT ); Wed, 13 Mar 2013 13:28:52 -0400 MIME-Version: 1.0 In-Reply-To: <1363136988-3704-1-git-send-email-agraf@suse.de> References: <1363136988-3704-1-git-send-email-agraf@suse.de> Date: Wed, 13 Mar 2013 10:28:50 -0700 X-Google-Sender-Auth: iYuQHC9_3bcKlddsz9eVl48cNtw Message-ID: Subject: Re: [PATCH] USB: ehci-s5p: Fix phy reset From: Doug Anderson To: Alexander Graf Cc: "linux-kernel@vger.kernel.org" , linux-usb@vger.kernel.org, linux-samsung-soc@vger.kernel.org, dmueller@suse.de, Vivek Gautam , Jingoo Han , Alan Stern , Kukjin Kim , Felipe Balbi , Greg Kroah-Hartman Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1119 Lines: 29 Alexander, On Tue, Mar 12, 2013 at 6:09 PM, Alexander Graf wrote: > - err = gpio_request_one(gpio, GPIOF_OUT_INIT_HIGH, "ehci_vbus_gpio"); > - if (err) > + /* reset pulls the line down, then up again */ > + err = gpio_request_one(gpio, GPIOF_OUT_INIT_LOW, "ehci_vbus_gpio"); > + if (err) { > dev_err(&pdev->dev, "can't request ehci vbus gpio %d", gpio); > + return; > + } > + mdelay(1); > + __gpio_set_value(gpio, 1); > + gpio_free(gpio); Freeing the gpio is a little on the iffy side since you actually care about keeping the value. Perhaps you can change this to devm_gpio_request_one() and avoid the free? I was about to submit a patch to do just that (since otherwise you run into trouble if you ever defer the probe) but then ran across your patch. Thanks! -Doug -- 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/