From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas =?iso-8859-1?Q?Bie=DFmann?= Date: Fri, 28 Oct 2016 12:37:30 +0200 Subject: [U-Boot] [U-Boot, v3, 6/7] usb: ehci-atmel: Remove unnecessary clock calling In-Reply-To: <1474945234-30540-7-git-send-email-wenyou.yang@atmel.com> References: <1474945234-30540-7-git-send-email-wenyou.yang@atmel.com> Message-ID: <20161028103730.l6od35bf7tymhea4@mba.local> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, Sep 27, 2016 at 11:00:33AM +0800, Wenyou Yang wrote: > Due to the peripheral clock driver improvement, remove the > unnecessary clock calling. > > Signed-off-by: Wenyou Yang Reviewed-by: Andreas Bie?mann > --- > > Changes in v3: None > Changes in v2: None > > drivers/usb/host/ehci-atmel.c | 15 --------------- > 1 file changed, 15 deletions(-) > > diff --git a/drivers/usb/host/ehci-atmel.c b/drivers/usb/host/ehci-atmel.c > index 2b138c5..a5c6d34 100644 > --- a/drivers/usb/host/ehci-atmel.c > +++ b/drivers/usb/host/ehci-atmel.c > @@ -56,9 +56,7 @@ struct ehci_atmel_priv { > > static int ehci_atmel_enable_clk(struct udevice *dev) > { > - struct udevice *dev_clk; > struct clk clk; > - int periph; > int ret; > > ret = clk_get_by_index(dev, 0, &clk); > @@ -73,19 +71,6 @@ static int ehci_atmel_enable_clk(struct udevice *dev) > if (ret) > return -EINVAL; > > - periph = fdtdec_get_uint(gd->fdt_blob, clk.dev->of_offset, "reg", -1); > - if (periph < 0) > - return -EINVAL; > - > - dev_clk = dev_get_parent(clk.dev); > - if (!dev_clk) > - return -ENODEV; > - > - ret = clk_request(dev_clk, &clk); > - if (ret) > - return ret; > - > - clk.id = periph; > ret = clk_enable(&clk); > if (ret) > return ret;