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, 08 Aug 2005 13:38:13 +0200 [thread overview]
Message-ID: <42F74425.90908@drzeus.cx> (raw)
In-Reply-To: <20050718184554.A31022@flint.arm.linux.org.uk>
[-- Attachment #1: Type: text/plain, Size: 390 bytes --]
Russell King wrote:
>
>I still don't like the needless duplication. How about doing it this
>way (see the attached patch.)
>
>Note: I also intend to move MMC over to using an IDR for the host
>numbers, which is why we need to setup the name at registration
>time, not allocation time.
>
>
>
This patch should cover the edge case of allocating but not registering
a host.
Rgds
Pierre
[-- Attachment #2: 04-safe_free.diff --]
[-- Type: text/x-patch, Size: 522 bytes --]
diff -uNp linux-2.6.13-rc6/drivers/mmc.orig/mmc.c linux-2.6.13-rc6/drivers/mmc/mmc.c
--- linux-2.6.13-rc6/drivers/mmc.orig/mmc.c 2005-08-08 13:29:53.000000000 +0200
+++ linux-2.6.13-rc6/drivers/mmc/mmc.c 2005-08-08 13:36:08.000000000 +0200
@@ -874,7 +874,11 @@ EXPORT_SYMBOL(mmc_remove_host);
void mmc_free_host(struct mmc_host *host)
{
flush_scheduled_work();
- mmc_free_host_sysfs(host);
+
+ if (host->class_dev.class != NULL)
+ mmc_free_host_sysfs(host);
+ else
+ kfree(host);
}
EXPORT_SYMBOL(mmc_free_host);
next prev parent reply other threads:[~2005-08-08 11:38 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
2005-08-08 11:38 ` Pierre Ossman [this message]
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=42F74425.90908@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