From d366b6436386875b1310ce8f70e3f9dea4647bac Mon Sep 17 00:00:00 2001 From: Russell King Date: Fri, 19 Aug 2005 09:40:08 +0100 Subject: [MMC] Add mmc_hostname() macro mmc_hostname() returns a pointer to the hostname for the mmc_host. Signed-off-by: Russell King --- include/linux/mmc/host.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index f90f674eb3b..30786230859 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -97,6 +97,7 @@ extern void mmc_free_host(struct mmc_host *); #define mmc_priv(x) ((void *)((x) + 1)) #define mmc_dev(x) ((x)->dev) +#define mmc_hostname(x) ((x)->host_name) extern int mmc_suspend_host(struct mmc_host *, pm_message_t); extern int mmc_resume_host(struct mmc_host *); -- cgit v1.2.3 From 00b137cfda5276b3d2c87d44236fe4c5ee68b405 Mon Sep 17 00:00:00 2001 From: Russell King Date: Fri, 19 Aug 2005 09:41:24 +0100 Subject: [MMC] Add MMC class devices Create a mmc_host class to allow enumeration of MMC host controllers even though they have no card(s) inserted. Patch based on work by Pierre Ossman. Signed-off-by: Russell King --- include/linux/mmc/host.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 30786230859..a74a810a130 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -63,6 +63,7 @@ struct device; struct mmc_host { struct device *dev; + struct class_device class_dev; struct mmc_host_ops *ops; unsigned int f_min; unsigned int f_max; -- cgit v1.2.3 From 1ad434d7cf5f490c71cfbbb2fb91076c01c8704e Mon Sep 17 00:00:00 2001 From: Russell King Date: Fri, 19 Aug 2005 09:42:21 +0100 Subject: [MMC] Use class device name for mmc host name There's no point in having the host name duplicated between the mmc_host structure and the encapsulated class device structure. Signed-off-by: Russell King --- include/linux/mmc/host.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include') diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index a74a810a130..113cc27865f 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -68,7 +68,6 @@ struct mmc_host { unsigned int f_min; unsigned int f_max; u32 ocr_avail; - char host_name[8]; /* host specific block data */ unsigned int max_seg_size; /* see blk_queue_max_segment_size */ @@ -98,7 +97,7 @@ extern void mmc_free_host(struct mmc_host *); #define mmc_priv(x) ((void *)((x) + 1)) #define mmc_dev(x) ((x)->dev) -#define mmc_hostname(x) ((x)->host_name) +#define mmc_hostname(x) ((x)->class_dev.class_id) extern int mmc_suspend_host(struct mmc_host *, pm_message_t); extern int mmc_resume_host(struct mmc_host *); -- cgit v1.2.3 From dce773771834221817e2d359a7e07a618ba08807 Mon Sep 17 00:00:00 2001 From: Russell King Date: Fri, 19 Aug 2005 09:42:52 +0100 Subject: [MMC] Use an IDR for host name indicies Signed-off-by: Russell King --- include/linux/mmc/host.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 113cc27865f..9a0893f3249 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -64,6 +64,7 @@ struct device; struct mmc_host { struct device *dev; struct class_device class_dev; + int index; struct mmc_host_ops *ops; unsigned int f_min; unsigned int f_max; -- cgit v1.2.3