* "Driver 'mmcblk' needs updating - please use bus_type methods"
@ 2015-02-18 16:12 Minchev, Todor
2015-03-03 3:25 ` Arseny Solokha
0 siblings, 1 reply; 2+ messages in thread
From: Minchev, Todor @ 2015-02-18 16:12 UTC (permalink / raw)
To: ulf.hansson@linaro.org, chris@printf.net; +Cc: linux-mmc@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 462 bytes --]
This has probably been reported already.
In 3.19 this started showing up in the dmesg log when the mmcblk driver
gets loaded:
"Driver 'mmcblk' needs updating - please use bus_type methods"
Looks like it is caused by the re-factoring needed after the removal of
struct mmc_driver. Both the mmc bus and the block driver register a
shutdown and the two fail the driver_register sanity check resulting in
the warning above.
Thanks,
Todor
[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5229 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: "Driver 'mmcblk' needs updating - please use bus_type methods"
2015-02-18 16:12 "Driver 'mmcblk' needs updating - please use bus_type methods" Minchev, Todor
@ 2015-03-03 3:25 ` Arseny Solokha
0 siblings, 0 replies; 2+ messages in thread
From: Arseny Solokha @ 2015-03-03 3:25 UTC (permalink / raw)
To: Minchev, Todor; +Cc: linux-mmc
> This has probably been reported already.
>
> In 3.19 this started showing up in the dmesg log when the mmcblk driver
> gets loaded:
>
> "Driver 'mmcblk' needs updating - please use bus_type methods"
>
> Looks like it is caused by the re-factoring needed after the removal of
> struct mmc_driver. Both the mmc bus and the block driver register a
> shutdown and the two fail the driver_register sanity check resulting in
> the warning above.
I've also run into this recently and failed to come up with any elegant
solution. Of course the warning could be safely ignored, but it doesn't seem
right in the long run.
Something similar to removed mmc_driver really seems to be the best solution
here. Otherwise, the following workaround is probably the simplest one, but as
for me it is too ugly to submit it seriously.
---
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index c69afb5..6355df1 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -2546,7 +2546,6 @@ static struct device_driver mmc_driver = {
.pm = &mmc_blk_pm_ops,
.probe = mmc_blk_probe,
.remove = mmc_blk_remove,
- .shutdown = mmc_blk_shutdown,
};
static int __init mmc_blk_init(void)
@@ -2566,6 +2565,15 @@ static int __init mmc_blk_init(void)
if (res)
goto out2;
+ /*
+ * device_shutdown() calls bus_ops ->shutdown() if it's present
+ * and falls back to device_driver ->shutdown() if it's not. This
+ * motivates existence of a sanity check in driver_register() against
+ * both ops being set at the same time. Work around this check
+ * with deferred setting of device_driver ->shutdown().
+ */
+ mmc_driver.shutdown = mmc_blk_shutdown;
+
return 0;
out2:
unregister_blkdev(MMC_BLOCK_MAJOR, "mmc");
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-03-03 3:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-18 16:12 "Driver 'mmcblk' needs updating - please use bus_type methods" Minchev, Todor
2015-03-03 3:25 ` Arseny Solokha
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.