Skip to content

Commit 67e1ab5

Browse files
Uwe Kleine-Könighdeller
authored andcommitted
fbdev: amifb: Mark driver struct with __refdata to prevent section mismatch warning
As described in the added code comment, a reference to .exit.text is ok for drivers registered via module_platform_driver_probe(). Make this explicit to prevent a section mismatch warning. Signed-off-by: Uwe Kleine-König <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Helge Deller <[email protected]>
1 parent cca202a commit 67e1ab5

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

drivers/video/fbdev/amifb.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3768,7 +3768,13 @@ static int __exit amifb_remove(struct platform_device *pdev)
37683768
return 0;
37693769
}
37703770

3771-
static struct platform_driver amifb_driver = {
3771+
/*
3772+
* amifb_remove() lives in .exit.text. For drivers registered via
3773+
* module_platform_driver_probe() this ok because they cannot get unboud at
3774+
* runtime. The driver needs to be marked with __refdata, otherwise modpost
3775+
* triggers a section mismatch warning.
3776+
*/
3777+
static struct platform_driver amifb_driver __refdata = {
37723778
.remove = __exit_p(amifb_remove),
37733779
.driver = {
37743780
.name = "amiga-video",

0 commit comments

Comments
 (0)