Some fbdev drivers do not request their memory correctly. Request the IO ports' memory so no other driver may access them. Only request 1 byte, because the inb() and out() are used for reading and writing.
Did not test on hardware. Signed-off-by: Daniel Matyas <[email protected]> --- drivers/video/fbdev/arcfb.c | 8 ++++++++ drivers/video/fbdev/n411.c | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/drivers/video/fbdev/arcfb.c b/drivers/video/fbdev/arcfb.c index b807cf07522d..6771a7409cde 100644 --- a/drivers/video/fbdev/arcfb.c +++ b/drivers/video/fbdev/arcfb.c @@ -481,6 +481,14 @@ static int arcfb_probe(struct platform_device *dev) printk(KERN_WARNING "no IO addresses supplied\n"); goto err_addr; } + + if (!devm_request_region(&dev->dev, dio_addr, 1, "arcfb") || + !devm_request_region(&dev->dev, cio_addr, 1, "arcfb") || + !devm_request_region(&dev->dev, c2io_addr, 1, "arcfb")) { + retval = -EBUSY; + goto err_addr; + } + par->dio_addr = dio_addr; par->cio_addr = cio_addr; par->c2io_addr = c2io_addr; diff --git a/drivers/video/fbdev/n411.c b/drivers/video/fbdev/n411.c index a3677313396e..ed0281939d37 100644 --- a/drivers/video/fbdev/n411.c +++ b/drivers/video/fbdev/n411.c @@ -165,6 +165,11 @@ static int __init n411_init(void) if (!n411_device) return -ENOMEM; + if (!devm_request_region(&n411_device->dev, dio_addr, 1, "n411") || + !devm_request_region(&n411_device->dev, cio_addr, 1, "n411") || + !devm_request_region(&n411_device->dev, c2io_addr, 1, "n411")) + return -EBUSY; + ret = platform_device_add_data(n411_device, &n411_board, sizeof(n411_board)); if (ret) -- 2.55.0
