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

Commit 99830c9b authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Greg Kroah-Hartman
Browse files

pcmcia: omap_cf: Mark driver struct with __refdata to prevent section mismatch



[ Upstream commit d1dfcdd30140c031ae091868fb5bed084132bca1 ]

As described in the added code comment, a reference to .exit.text is ok
for drivers registered via platform_driver_probe().  Make this explicit
to prevent the following section mismatch warning

    WARNING: modpost: drivers/pcmcia/omap_cf: section mismatch in reference: omap_cf_driver+0x4 (section: .data) -> omap_cf_remove (section: .exit.text)

that triggers on an omap1_defconfig + CONFIG_OMAP_CF=m build.

Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Acked-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: default avatarUwe Kleine-König <u.kleine-koenig@baylibre.com>
Signed-off-by: default avatarDominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent a7106867
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -327,7 +327,13 @@ static int __exit omap_cf_remove(struct platform_device *pdev)
	return 0;
}

static struct platform_driver omap_cf_driver = {
/*
 * omap_cf_remove() lives in .exit.text. For drivers registered via
 * platform_driver_probe() this is ok because they cannot get unbound at
 * runtime. So mark the driver struct with __refdata to prevent modpost
 * triggering a section mismatch warning.
 */
static struct platform_driver omap_cf_driver __refdata = {
	.driver = {
		.name	= (char *) driver_name,
	},