From: "Lothar Waßmann" <LW@KARO-electronics.de>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Viresh Kumar <viresh.kumar@st.com>,
mturquette@linaro.org, sshtylyov@mvista.com,
spear-devel@list.st.com, linux-kernel@vger.kernel.org,
linux-ide@vger.kernel.org, viresh.linux@gmail.com,
linux@arm.linux.org.uk, akpm@linux-foundation.org,
jgarzik@redhat.com, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH V3 07/12] ata/sata_mv: Remove conditional compilation of clk code
Date: Tue, 24 Apr 2012 14:51:00 +0200 [thread overview]
Message-ID: <20374.41396.280974.710188@ipc1.ka-ro> (raw)
In-Reply-To: <20120424120019.GE24089@lunn.ch>
Hi,
Andrew Lunn writes:
> > -#if defined(CONFIG_HAVE_CLK)
> > hpriv->clk = clk_get(&pdev->dev, NULL);
> > - if (IS_ERR(hpriv->clk))
> > - dev_notice(&pdev->dev, "cannot get clkdev\n");
> > - else
> > - clk_enable(hpriv->clk);
> > -#endif
> > + if (IS_ERR(hpriv->clk)) {
> > + dev_err(&pdev->dev, "cannot get clkdev\n");
> > + return PTR_ERR(hpriv->clk);
> > + }
> > +
> > + clk_enable(hpriv->clk);
>
> Sorry, but still wrong.
>
> The clock is optional. If we can find a clock, turn it on. If not,
> keep going....
>
> You patch causes the missing clock to become a fatal error.
>
The clock API should accept NULL pointers as valid clocks and
treat them as NOP.
Thus drivers wouldn't have to worry about whether they actually got a
clock to manage or if their clocks are just dummies.
Lothar Waßmann
--
___________________________________________________________
Ka-Ro electronics GmbH | Pascalstraße 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Geschäftsführer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996
www.karo-electronics.de | info@karo-electronics.de
___________________________________________________________
next prev parent reply other threads:[~2012-04-24 12:51 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1335266056.git.viresh.kumar@st.com>
2012-04-24 11:21 ` [PATCH V3 06/12] ata/pata_arasan: Remove conditional compilation of clk code Viresh Kumar
2012-04-24 11:21 ` [PATCH V3 07/12] ata/sata_mv: " Viresh Kumar
2012-04-24 12:00 ` Andrew Lunn
2012-04-24 12:51 ` Lothar Waßmann [this message]
2012-04-24 13:42 ` viresh kumar
2012-04-24 14:29 ` Andrew Lunn
2012-04-24 17:02 ` viresh kumar
2012-04-25 5:42 ` Andrew Lunn
2012-04-24 17:05 ` viresh kumar
2012-04-24 20:18 ` Russell King - ARM Linux
2012-04-25 3:02 ` viresh kumar
2012-04-25 5:28 ` Andrew Lunn
2012-04-25 6:43 ` Lothar Waßmann
2012-04-25 7:14 ` Andrew Lunn
2012-04-25 8:35 ` Lothar Waßmann
2012-04-25 9:31 ` Andrew Lunn
2012-04-25 10:37 ` Russell King - ARM Linux
2012-04-25 11:24 ` Andrew Lunn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20374.41396.280974.710188@ipc1.ka-ro \
--to=lw@karo-electronics.de \
--cc=akpm@linux-foundation.org \
--cc=andrew@lunn.ch \
--cc=jgarzik@redhat.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mturquette@linaro.org \
--cc=spear-devel@list.st.com \
--cc=sshtylyov@mvista.com \
--cc=viresh.kumar@st.com \
--cc=viresh.linux@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox