Messages in this thread | | | Date | Wed, 22 Mar 2006 15:27:48 -0600 | From | Corey Minyard <> | Subject | Re: [PATCH] Try 2, Fix release function in IPMI device model |
| |
Dmitry Torokhov wrote:
>On 3/22/06, Corey Minyard <minyard@acm.org> wrote: > > >> struct bmc_device >> { >>- struct platform_device dev; >>+ struct platform_device *dev; >> struct ipmi_device_id id; >> unsigned char guid[16]; >> int guid_set; >>- int interfaces; >>+ >>+ struct kref refcount; >> >> >> > >Hi, > >I am confused as to why you need kref here. Just unregister/kfree >memory occupied by your device structure after doing >platform_device_unregister and that's it. platform code won't >reference your memory and your attribute code should not be called >from module exit code so everything shoudl be fine. > > This structure represents a "BMC", which is a microcontroller that does managment functions. There may be more than one interface to a BMC, so the kref keeps track of all the interfaces referencing the structure.
-Corey - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |