2007-12-07 04:12:56

by Nicolas Pitre

[permalink] [raw]
Subject: [PATCH] mmc: remove unused 'mode' from the mmc_host structure

This field and corresponding defines are simply never used anywhere
in the code. But its mere presence is enough to confuse some host
driver authors who attempt to rely on it. Let's eliminate the
possibility for confusion and remove it entirely.

Signed-off-by: Nicolas Pitre <[email protected]>
---

yes, it's the second host driver I'm reviewing with this issue...

diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index 125eee1..7ab962f 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -118,10 +118,6 @@ struct mmc_host {
unsigned int removed:1; /* host is being removed */
#endif

- unsigned int mode; /* current card mode of host */
-#define MMC_MODE_MMC 0
-#define MMC_MODE_SD 1
-
struct mmc_card *card; /* device attached to this host */

wait_queue_head_t wq;


2007-12-09 17:01:36

by Pierre Ossman

[permalink] [raw]
Subject: Re: [PATCH] mmc: remove unused 'mode' from the mmc_host structure

On Thu, 06 Dec 2007 23:12:46 -0500 (EST)
Nicolas Pitre <[email protected]> wrote:

> This field and corresponding defines are simply never used anywhere
> in the code. But its mere presence is enough to confuse some host
> driver authors who attempt to rely on it. Let's eliminate the
> possibility for confusion and remove it entirely.
>
> Signed-off-by: Nicolas Pitre <[email protected]>
> ---

Oopsie. Some old stuff since before the restructuring.

>
> yes, it's the second host driver I'm reviewing with this issue...
>

Seems to be a bit of Windows mentality that spills over. Maybe you should give them a quick tutorial in that in Linux we fix stuff at the source. ;)

Thanks for the patch. I've queued it up.

Rgds
Pierre


Attachments:
signature.asc (189.00 B)