mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-24 15:42:32 +00:00
mmc: let host be parent of cards
Change the parent of cards to be a specific host (a class device), not the physical controller. This is particularly useful when the hardware has multiple slots, meaning multiple hosts. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
This commit is contained in:
parent
f22ee4edf6
commit
11354d03af
2 changed files with 2 additions and 1 deletions
|
@ -199,7 +199,7 @@ void mmc_init_card(struct mmc_card *card, struct mmc_host *host)
|
||||||
memset(card, 0, sizeof(struct mmc_card));
|
memset(card, 0, sizeof(struct mmc_card));
|
||||||
card->host = host;
|
card->host = host;
|
||||||
device_initialize(&card->dev);
|
device_initialize(&card->dev);
|
||||||
card->dev.parent = mmc_dev(host);
|
card->dev.parent = mmc_classdev(host);
|
||||||
card->dev.bus = &mmc_bus_type;
|
card->dev.bus = &mmc_bus_type;
|
||||||
card->dev.release = mmc_release_card;
|
card->dev.release = mmc_release_card;
|
||||||
}
|
}
|
||||||
|
|
|
@ -127,6 +127,7 @@ static inline void *mmc_priv(struct mmc_host *host)
|
||||||
}
|
}
|
||||||
|
|
||||||
#define mmc_dev(x) ((x)->parent)
|
#define mmc_dev(x) ((x)->parent)
|
||||||
|
#define mmc_classdev(x) (&(x)->class_dev)
|
||||||
#define mmc_hostname(x) ((x)->class_dev.bus_id)
|
#define mmc_hostname(x) ((x)->class_dev.bus_id)
|
||||||
|
|
||||||
extern int mmc_suspend_host(struct mmc_host *, pm_message_t);
|
extern int mmc_suspend_host(struct mmc_host *, pm_message_t);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue