]> err.no Git - linux-2.6/commitdiff
[MMC] Use class device name for mmc host name
authorRussell King <rmk@dyn-67.arm.linux.org.uk>
Fri, 19 Aug 2005 08:42:21 +0000 (09:42 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 19 Aug 2005 08:42:21 +0000 (09:42 +0100)
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 <rmk+kernel@arm.linux.org.uk>
drivers/mmc/mmc_sysfs.c
include/linux/mmc/host.h

index 96c192057df32a51df865712d22b53a3b2f1480a..34fa4a3a02d59ad042e501ee15d0cd47c6cef515 100644 (file)
@@ -263,10 +263,9 @@ int mmc_add_host_sysfs(struct mmc_host *host)
 {
        static unsigned int host_num;
 
-       snprintf(host->host_name, sizeof(host->host_name),
+       snprintf(host->class_dev.class_id, BUS_ID_SIZE,
                 "mmc%d", host_num++);
 
-       strlcpy(host->class_dev.class_id, host->host_name, BUS_ID_SIZE);
        return class_device_add(&host->class_dev);
 }
 
index a74a810a130299eb057e91adc6bb77cc66e62d2a..113cc27865f0e88a5c15fab599c10252262b8493 100644 (file)
@@ -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 *);