Am 12.02.2007 19:47 schrieb Greg KH: >>>>> +static void gigaset_device_release(struct device *dev) >>>>> +{ >>>>> + //FIXME anything to do? cf. platform_device_release() >>>>> +} > The memory of the platform device itself needs to be freed here, > otherwise, to do it earlier would cause race conditions and oopses. I don't do it earlier. I do it later. My platform_device structure is part of my driver's device state structure which is freed explicitly later after the call to platform_device_unregister(). Is that bad? > Look at how the other platform drivers do things. They do things differently from each other as well as from mine. block/floppy.c, for example, just has a call to complete() there. Anyway, in the latest version of my driver, its platform_device release function finally does something, too: it frees dev->platform_data and pdev->resource just in case something might have materialized there. I hope that's ok. Regards, Tilman -- Tilman Schmidt E-Mail: [email protected] Bonn, Germany Diese Nachricht besteht zu 100% aus wiederverwerteten Bits. Ungeöffnet mindestens haltbar bis: (siehe Rückseite)
Attachment:
signature.asc
Description: OpenPGP digital signature
- References:
- Re: [PATCH] drivers/isdn/gigaset: new M101 driver
- From: Andrew Morton <[email protected]>
- Re: [PATCH] drivers/isdn/gigaset: new M101 driver
- From: Greg KH <[email protected]>
- Re: [PATCH] drivers/isdn/gigaset: new M101 driver
- From: Tilman Schmidt <[email protected]>
- Re: [PATCH] drivers/isdn/gigaset: new M101 driver
- From: Greg KH <[email protected]>
- Re: [PATCH] drivers/isdn/gigaset: new M101 driver
- Prev by Date: Coding style RFC: convert "for (i=0;i<ARRAY_SIZE(array);i++)" to "array_for_each(index, array)"
- Next by Date: Re: [RFC][PATCH] PM: Document requirements for basic PM support in drivers
- Previous by thread: Re: [PATCH] drivers/isdn/gigaset: new M101 driver
- Next by thread: Re: [PATCH] drivers/isdn/gigaset: new M101 driver
- Index(es):