linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* one doubt about mmc_sdio_init_card function
@ 2014-07-01  5:39 Fu, Zhonghui
  2014-07-02  2:52 ` Aaron Lu
  2014-07-03 15:47 ` One bug of SDHCI driver Fu, Zhonghui
  0 siblings, 2 replies; 16+ messages in thread
From: Fu, Zhonghui @ 2014-07-01  5:39 UTC (permalink / raw)
  To: chris, ulf.hansson, jh80.chung, tgih.jun, aaron.lu, linux-mmc,
	linux-kernel, jackey.shen, gregkh


Hi, all

The mmc_sdio_init_card(drivers/mmc/core/sdio.c) function calls mmc_alloc_card(drivers/mmc/core/bus.c) function to allocate a card structure. card->dev.bus is assigned with mmc_bus_type in mmc_alloc_card function. Why not assign sdio_bus_type to card->dev.bus?


struct mmc_card *mmc_alloc_card(struct mmc_host *host, struct device_type *type)
{
    struct mmc_card *card;

    card = kzalloc(sizeof(struct mmc_card), GFP_KERNEL);
    if (!card)
        return ERR_PTR(-ENOMEM);

    card->host = host;

    device_initialize(&card->dev);

    card->dev.parent = mmc_classdev(host);
    card->dev.bus = &mmc_bus_type;
    card->dev.release = mmc_release_card;
    card->dev.type = type;

    return card;
}


Thanks,
Zhonghui

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2014-08-11  5:53 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-01  5:39 one doubt about mmc_sdio_init_card function Fu, Zhonghui
2014-07-02  2:52 ` Aaron Lu
2014-07-03 15:47 ` One bug of SDHCI driver Fu, Zhonghui
2014-07-04  2:40   ` Jaehoon Chung
2014-07-06 15:19     ` Fu, Zhonghui
2014-07-08 16:03       ` Fu, Zhonghui
2014-07-14 13:26         ` Chris Ball
2014-07-15  2:54           ` Fu, Zhonghui
2014-07-15  4:14             ` Jaehoon Chung
2014-07-15  4:40               ` Jaehoon Chung
2014-07-20 14:51                 ` Fu, Zhonghui
2014-07-24 15:27                   ` Fu, Zhonghui
     [not found]                     ` <53D85CBF.3070409@linux.intel.com>
2014-07-30  3:40                       ` Jaehoon Chung
2014-08-05  4:56                         ` Fu, Zhonghui
2014-08-07  6:58                           ` Fu, Zhonghui
2014-08-11  5:53                             ` Fu, Zhonghui

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).