From: Cyril Bur <cyrilbur@gmail.com>
To: Joel Stanley <joel@jms.id.au>
Cc: "Cédric Le Goater" <clg@kaod.org>,
"OpenBMC Maillist" <openbmc@lists.ozlabs.org>
Subject: Re: [PATCH linux dev-4.7 4/8] ipmi: add an Aspeed BT IPMI BMC driver
Date: Thu, 03 Nov 2016 13:48:58 +1100 [thread overview]
Message-ID: <1478141338.728.8.camel@gmail.com> (raw)
In-Reply-To: <CACPK8Xc+BoiZqQ5-i7EC7DQTugQVM0i1o2rN+9P0ekor6R+ZXA@mail.gmail.com>
On Thu, 2016-11-03 at 13:16 +1030, Joel Stanley wrote:
> On Thu, Nov 3, 2016 at 11:26 AM, Cyril Bur <cyrilbur@gmail.com>
> wrote:
> >
> > > +static int bt_bmc_remove(struct platform_device *pdev)
> > > +{
> > > + struct bt_bmc *bt_bmc = dev_get_drvdata(&pdev->dev);
> > > +
> > > + misc_deregister(&bt_bmc->miscdev);
> > > + if (!bt_bmc->irq)
> > > + del_timer_sync(&bt_bmc->poll_timer);
> >
> > The old bt-host driver had:
> > devm_iounmap(&pdev->dev, bt_host->base);
> > devm_kfree(&pdev->dev, bt_host);
> >
> > Is there kernel magic that means they aren't needed?
>
> Yep. The devm_ api's in the kernel are "managed" (hence the m) by the
> driver subsystem. When the driver detaches, all of the resources
> allocated with devm_ calls are automatically freed in the order they
> were allocated.
>
> https://www.kernel.org/doc/Documentation/driver-model/devres.txt
> http://haifux.org/lectures/323/haifux-devres.pdf
>
*magic*
Thanks!
> Cheers,
>
> Joel
next prev parent reply other threads:[~2016-11-03 2:49 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-26 6:57 [PATCH linux dev-4.7 0/8] BT driver sync up Cédric Le Goater
2016-10-26 6:57 ` [PATCH linux dev-4.7 1/8] Revert "misc: Add Aspeed BT IPMI host driver" Cédric Le Goater
2016-10-26 6:57 ` [PATCH linux dev-4.7 2/8] ARM: aspeed: remove previous definitions in default config Cédric Le Goater
2016-10-26 6:57 ` [PATCH linux dev-4.7 3/8] ARM: dts: aspeed: remove previous iBT definitions Cédric Le Goater
2016-10-26 6:57 ` [PATCH linux dev-4.7 4/8] ipmi: add an Aspeed BT IPMI BMC driver Cédric Le Goater
2016-11-02 0:00 ` Joel Stanley
2016-11-02 7:08 ` Cédric Le Goater
2016-11-03 0:56 ` Cyril Bur
2016-11-03 2:46 ` Joel Stanley
2016-11-03 2:48 ` Cyril Bur [this message]
2016-10-26 6:57 ` [PATCH linux dev-4.7 5/8] ARM: aspeed: Add defconfigs for CONFIG_ASPEED_BT_IPMI_BMC Cédric Le Goater
2016-10-26 6:57 ` [PATCH linux dev-4.7 6/8] ARM: dts: aspeed: Enable BT IPMI BMC device Cédric Le Goater
2016-10-26 6:57 ` [PATCH linux dev-4.7 7/8] ipmi: maintain a request expiry list Cédric Le Goater
2016-11-03 0:26 ` Cyril Bur
2016-11-03 9:06 ` Cédric Le Goater
2016-11-10 7:53 ` Cédric Le Goater
2016-11-03 18:23 ` Patrick Williams
2016-11-03 18:46 ` Cédric Le Goater
2016-11-04 1:55 ` Patrick Williams
2016-11-04 8:09 ` Cédric Le Goater
2016-11-04 18:22 ` Brendan Higgins
2016-11-07 5:25 ` Cédric Le Goater
2016-11-07 15:02 ` Patrick Williams
2016-11-07 19:29 ` Brendan Higgins
2016-11-08 9:58 ` Cédric Le Goater
2016-10-26 6:57 ` [PATCH linux dev-4.7 8/8] ipmi: add a sysfs file for configure maximum response time Cédric Le Goater
2016-11-03 0:30 ` [PATCH linux dev-4.7 0/8] BT driver sync up Cyril Bur
2016-11-10 9:13 ` Cédric Le Goater
2016-11-10 11:33 ` Joel Stanley
2016-11-10 12:04 ` Cédric Le Goater
2016-11-10 12:11 ` Joel Stanley
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=1478141338.728.8.camel@gmail.com \
--to=cyrilbur@gmail.com \
--cc=clg@kaod.org \
--cc=joel@jms.id.au \
--cc=openbmc@lists.ozlabs.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.