[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BANLkTi=XBVNqNx_dvW87AHHqAKdMJMiMmQ@mail.gmail.com>
Date: Fri, 1 Jul 2011 18:13:54 +0300
From: Ohad Ben-Cohen <ohad@...ery.com>
To: Grant Likely <grant.likely@...retlab.ca>
Cc: linux-omap@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, akpm@...ux-foundation.org,
Brian Swetland <swetland@...gle.com>,
Arnd Bergmann <arnd@...db.de>,
davinci-linux-open-source
<davinci-linux-open-source@...ux.davincidsp.com>,
Rusty Russell <rusty@...tcorp.com.au>
Subject: Re: [RFC 7/8] drivers: introduce rpmsg, a remote-processor messaging bus
On Wed, Jun 29, 2011 at 6:43 PM, Grant Likely <grant.likely@...retlab.ca> wrote:
> So you are right that device_unregister drops the refcount to zero,
> but the code still needs to be fixed to not call kfree() directly.
Good point, thanks !
> It also looks like rpmsg_destroy_channel() needs to be fixed to remove
> the kfree call
Yes, I need to remove this direct kfree as well, and indeed just let
rpmsg_release_device do its thing when the last reference is dropped.
I should also remove the direct kfree when device_register fails: in
that case, I need only to put_device and let the release handler do
its thing too.
> and an extra put_device() call.
We need that extra put_device in rpmsg_destroy_channel because
device_find_child() is doing get_device before returning it.
Thanks, Grant!
Ohad.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists