From: Pierre Ossman <drzeus-list@drzeus.cx>
To: Russell King <rmk+lkml@arm.linux.org.uk>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] MMC host class
Date: Mon, 18 Jul 2005 20:22:48 +0200 [thread overview]
Message-ID: <42DBF378.7080804@drzeus.cx> (raw)
In-Reply-To: <20050718184554.A31022@flint.arm.linux.org.uk>
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?
Rgds
Pierre
next prev parent reply other threads:[~2005-07-18 18:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-13 15:52 [PATCH] MMC host class Pierre Ossman
2005-07-15 8:31 ` Russell King
2005-07-15 12:26 ` Pierre Ossman
2005-07-15 20:21 ` Pierre Ossman
2005-07-18 17:45 ` Russell King
2005-07-18 18:22 ` Pierre Ossman [this message]
2005-08-08 11:38 ` Pierre Ossman
2005-08-18 23:09 ` Russell King
2005-08-19 6:14 ` Pierre Ossman
2005-08-19 7:49 ` Russell King
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=42DBF378.7080804@drzeus.cx \
--to=drzeus-list@drzeus.cx \
--cc=linux-kernel@vger.kernel.org \
--cc=rmk+lkml@arm.linux.org.uk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox