Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d1b26863 authored by Kay Sievers's avatar Kay Sievers Committed by Pierre Ossman
Browse files

mmc: struct device - replace bus_id with dev_name(), dev_set_name()

parent 493890e7
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -216,8 +216,7 @@ int mmc_add_card(struct mmc_card *card)
	int ret;
	const char *type;

	snprintf(card->dev.bus_id, sizeof(card->dev.bus_id),
		 "%s:%04x", mmc_hostname(card->host), card->rca);
	dev_set_name(&card->dev, "%s:%04x", mmc_hostname(card->host), card->rca);

	switch (card->type) {
	case MMC_TYPE_MMC:
+2 −3
Original line number Diff line number Diff line
@@ -73,8 +73,7 @@ struct mmc_host *mmc_alloc_host(int extra, struct device *dev)
	if (err)
		goto free;

	snprintf(host->class_dev.bus_id, BUS_ID_SIZE,
		 "mmc%d", host->index);
	dev_set_name(&host->class_dev, "mmc%d", host->index);

	host->parent = dev;
	host->class_dev.parent = dev;
@@ -121,7 +120,7 @@ int mmc_add_host(struct mmc_host *host)
	WARN_ON((host->caps & MMC_CAP_SDIO_IRQ) &&
		!host->ops->enable_sdio_irq);

	led_trigger_register_simple(host->class_dev.bus_id, &host->led);
	led_trigger_register_simple(dev_name(&host->class_dev), &host->led);

	err = device_add(&host->class_dev);
	if (err)
+1 −2
Original line number Diff line number Diff line
@@ -239,8 +239,7 @@ int sdio_add_func(struct sdio_func *func)
{
	int ret;

	snprintf(func->dev.bus_id, sizeof(func->dev.bus_id),
		 "%s:%d", mmc_card_id(func->card), func->num);
	dev_set_name(&func->dev, "%s:%d", mmc_card_id(func->card), func->num);

	ret = device_add(&func->dev);
	if (ret == 0)
+1 −1
Original line number Diff line number Diff line
@@ -1348,7 +1348,7 @@ static int mmc_spi_probe(struct spi_device *spi)
		goto fail_add_host;

	dev_info(&spi->dev, "SD/MMC host %s%s%s%s%s\n",
			mmc->class_dev.bus_id,
			dev_name(&mmc->class_dev),
			host->dma_dev ? "" : ", no DMA",
			(host->pdata && host->pdata->get_ro)
				? "" : ", no WP",
+1 −1
Original line number Diff line number Diff line
@@ -1733,7 +1733,7 @@ int sdhci_add_host(struct sdhci_host *host)
	mmc_add_host(mmc);

	printk(KERN_INFO "%s: SDHCI controller on %s [%s] using %s%s\n",
		mmc_hostname(mmc), host->hw_name, mmc_dev(mmc)->bus_id,
		mmc_hostname(mmc), host->hw_name, dev_name(mmc_dev(mmc)),
		(host->flags & SDHCI_USE_ADMA)?"A":"",
		(host->flags & SDHCI_USE_DMA)?"DMA":"PIO");

Loading