From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Felipe Balbi <balbi@ti.com>
Cc: Jonghwa Lee <jonghwa3.lee@samsung.com>,
linux-kernel@vger.kernel.org,
Mike Turquette <mturquette@linaro.org>,
Arnd Bergmann <arnd@arndb.de>,
Hartley Sweeten <hsweeten@visionengravers.com>,
MyungJoo Ham <myungjoo.ham@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>
Subject: Re: [PATCH v3] clock: max77686: Add driver for Maxim 77686 32KHz crystal oscillator
Date: Mon, 11 Jun 2012 19:21:50 +0800 [thread overview]
Message-ID: <20120611112149.GK11439@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <20120611110958.GT6845@arwen.pp.htv.fi>
[-- Attachment #1: Type: text/plain, Size: 1052 bytes --]
On Mon, Jun 11, 2012 at 02:09:59PM +0300, Felipe Balbi wrote:
> On Mon, Jun 11, 2012 at 08:01:20PM +0900, Jonghwa Lee wrote:
> > +static __devinit int max77686_clk_probe(struct platform_device *pdev)
> why platform_device ? Isn't this an i2c device ? So this should be
> i2c-client driver...
It's a component on an MFD.
> > + if (!max77686[i])
> > + return -ENOMEM;
> > +
> > + max77686[i]->iodev = iodev;
> > + max77686[i]->mask = 1 << i;
> > + mutex_init(&max77686[i]->mutex);
> > + }
> doesn't look like the right way to do this. What if a user doesn't use
> all clk outputs ?
It seems like a bad idea for the individual drivers to have to worry
about that, it seems simpler for them to register all their resources
and then let the subsystem do what it likes with them.
> > +static int __devexit max77686_clk_remove(struct platform_device *pdev)
> > +{
> > + kfree(clk32khz_ap);
> > + kfree(clk32khz_cp);
> > + kfree(clk32khz_pmic);
> kfree() or clk_unregister() ??
Shouldn't be kfree(), the memory is allocated with devm_kzalloc().
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2012-06-11 11:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-11 11:01 [PATCH v3] clock: max77686: Add driver for Maxim 77686 32KHz crystal oscillator Jonghwa Lee
2012-06-11 11:09 ` Felipe Balbi
2012-06-11 11:21 ` Mark Brown [this message]
2012-06-11 11:16 ` Mark Brown
2012-06-11 15:25 ` Arnd Bergmann
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=20120611112149.GK11439@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=arnd@arndb.de \
--cc=balbi@ti.com \
--cc=hsweeten@visionengravers.com \
--cc=jonghwa3.lee@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@linaro.org \
--cc=myungjoo.ham@samsung.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