[lkml]   [2005]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] MMC host class
Russell King wrote:

>On Fri, Jul 15, 2005 at 10:21:43PM +0200, Pierre Ossman wrote:
>>Russell King wrote:
>>>Also note that since we have a class_dev, the mmc_host 'dev' field can
>>>be removed. However, we'll probably have to update the host drivers
>>>to do this, so it should be a separate patch.
>>I believe there's a bit of abstraction to be gained from not poking
>>around inside the class_dev struct in too many places. It's not like
>>we're wasting any large amounts of memory.
>I still don't like the needless duplication. How about doing it this
>way (see the attached patch.)

The mmc_hostname macro seems like a good solution. It'll keep the
abstraction even if stuff needs to be moved around.

I see a problem with waiting until mmc_add_host() until initialising the
kobject though. If a driver calls mmc_alloc_host() and then
mmc_free_host(), perhaps because of some error, then the structure won't
be freed since we rely on release getting called. That's why I tried to
get the kobject stuff set up with the allocation.

Perhaps it is possible to test if a kobject is initialised and if not
free the structure directly?


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-07-18 20:26    [W:0.062 / U:10.912 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site