mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Wei-Chun Pan <weichun.pan@advantech.com.tw>
To: Lee Jones <lee.jones@linaro.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>,
	Jean Delvare <jdelvare@suse.de>,
	Guenter Roeck <linux@roeck-us.net>,
	Wolfram Sang <wsa@the-dreams.de>,
	"Louis.Lu" <Louis.Lu@advantech.com.tw>,
	"Neo.Lo" <neo.lo@advantech.com.tw>,
	"Hank.Peng" <Hank.Peng@advantech.com.tw>,
	"Kevin.Ong" <Kevin.Ong@advantech.com.tw>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/4] mfd: imanager2: Add Core supports for IT8516/18/28
Date: Tue, 19 Aug 2014 03:04:39 -0700	[thread overview]
Message-ID: <1408442679-3662-1-git-send-email-weichun.pan@advantech.com.tw> (raw)

> You've replied to this email as an independent message, so now there is little
> context.  When you reply, please ensure your mailer replies to the thread.
> 

Could you tell me more detail about this?
I use Git to reply mails but don't know how to set them to be dependent on.

> On Thu, 07 Aug 2014, Wei-Chun Pan wrote:
> > I have a question for your comment. As your mail,
> >
> > > > +
> > > > +static void __exit imanager2_mfd_device_exit(void) {
> > > > +	mfd_remove_devices(&ec_pdev->dev);
> > > > +	platform_device_unregister(ec_pdev);
> > > > +}
> > > > +
> > > > +module_init(imanager2_mfd_device_init);
> > > > +module_exit(imanager2_mfd_device_exit);
> > >
> > > This is a mess.  Use module_platform_driver() instead.
> > >
> > > > +MODULE_AUTHOR("Richard Vidal-Dorsch <richard.dorsch at
> > > > +advantech.com>");
> > > > +MODULE_DESCRIPTION("iManager2 platform device definitions v"
> > > > +DRV_VERSION); MODULE_LICENSE("GPL");
> MODULE_VERSION(DRV_VERSION);
> > >
> >
> > How can I use module_platform_driver() and my driver exit function
> > also can do mfd_remove_devices().
> > Or any other better function install of mfd_remove_devices()?
> 
> That's the point - you don't do mfd_remove_devices() in exit(), you do
> mfd_add_devices() in .probe() and mfd_remove_devices() in .remove().
> 
> The only thing you want to do in init() is platform_driver_register(), or even better
> - don't have init() and exit() calls and use use
> module_platform_driver_probe() instead.
> 

It seems that module_platform_driver() only registers/unregisters driver but not device.
Is there a method to register/unregister my device?

--
Wei-Chun Pan

             reply	other threads:[~2014-08-19 10:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-19 10:04 Wei-Chun Pan [this message]
2014-08-29 11:23 ` Lee Jones
  -- strict thread matches above, loose matches on Subject: below --
2014-08-07  9:47 Wei-Chun Pan
2014-08-07 10:01 ` Lee Jones
2014-07-14 12:54 [PATCH 1/4] mfd: imanager2: Add defines support " Wei-Chun Pan
2014-07-14 12:54 ` [PATCH 3/4] mfd: imanager2: Add Core supports " Wei-Chun Pan
2014-07-22  8:56   ` Lee Jones

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=1408442679-3662-1-git-send-email-weichun.pan@advantech.com.tw \
    --to=weichun.pan@advantech.com.tw \
    --cc=Hank.Peng@advantech.com.tw \
    --cc=Kevin.Ong@advantech.com.tw \
    --cc=Louis.Lu@advantech.com.tw \
    --cc=jdelvare@suse.de \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=neo.lo@advantech.com.tw \
    --cc=sameo@linux.intel.com \
    --cc=wsa@the-dreams.de \
    /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

all inboxes | Powered by JetHome®