All of lore.kernel.org
 help / color / mirror / Atom feed
From: Corey Minyard <minyard@acm.org>
To: dtor_core@ameritech.net
Cc: Greg KH <greg@kroah.com>,
	Russell King <rmk+lkml@arm.linux.org.uk>,
	Arjan van de Ven <arjan@infradead.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>,
	Yani Ioannou <yani.ioannou@gmail.com>
Subject: Re: [PATCH] Try 2, Fix release function in IPMI device model
Date: Wed, 22 Mar 2006 15:35:56 -0600	[thread overview]
Message-ID: <4421C33C.9030408@acm.org> (raw)
In-Reply-To: <d120d5000603221318n7b4d664eh3cafc9260f6e12e@mail.gmail.com>

Dmitry Torokhov wrote:

>On 3/22/06, Greg KH <greg@kroah.com> wrote:
>  
>
>>On Wed, Mar 22, 2006 at 02:45:01PM -0600, Corey Minyard wrote:
>>    
>>
>>>Ok, one more try.  Russell, I assume you mean to use
>>>platform_device_alloc(), which seems to do what you suggested.
>>>And I assume the driver_data is the way to store whatever you
>>>need, instead of using the container_of() macro.
>>>
>>>Arjun, Russell, thanks for the info.
>>>
>>>Now the patch...
>>>
>>>Arjun van de Ven pointed out that the changeover to the driver model
>>>in the IPMI driver had some bugs in it dealing with the release
>>>function and cleanup.  Then Russell King pointed out that you can't
>>>put release functions in the same module as the unregistering code.
>>>      
>>>
>>Yes you can, you just have to properly set up the module attribute
>>owners and it will work just fine.
>>
>>    
>>
>
>No, not really. You can only do that if _all_ sysfs attributes for the
>object are handled in your driver which is rarely the case (dev,
>/power/* attributes, etc).
>  
>
I don't see an owner field in the device structure.  So you are
saying that if the same module owns the device_driver structure,
it is safe, but if not it is not safe.

-Corey

  reply	other threads:[~2006-03-22 21:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-22 20:45 [PATCH] Try 2, Fix release function in IPMI device model Corey Minyard
2006-03-22 21:08 ` Greg KH
2006-03-22 21:18   ` Dmitry Torokhov
2006-03-22 21:35     ` Corey Minyard [this message]
2006-03-22 21:39       ` Dmitry Torokhov
2006-03-22 21:23 ` Dmitry Torokhov
2006-03-22 21:27   ` Corey Minyard

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=4421C33C.9030408@acm.org \
    --to=minyard@acm.org \
    --cc=akpm@osdl.org \
    --cc=arjan@infradead.org \
    --cc=dtor_core@ameritech.net \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk+lkml@arm.linux.org.uk \
    --cc=yani.ioannou@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 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.