fb: Add a default getinfo method

fb_getinfo is badly designed as it returns either the
info if the driver have the method or ENXIO via the kobj stuff
if the driver doesn't have it.
Add a default method that returns NULL as the code already checks this
and it avoid changing the interface.
None of the drm drivers supported have this method and it sometimes
fails and panic when loading them (for now only usb-c docks seems to be
affected).

MFC after:	3 days
Sponsored by:	Beckhoff Automation GmbH & Co. KG
This commit is contained in:
Emmanuel Vadot 2022-06-21 15:52:49 +02:00
parent b256d2dc0c
commit 3cbf6518d6

View File

@ -3,6 +3,14 @@
INTERFACE fb;
CODE {
static struct fb_info *
fb_default_getinfo(device_t dev)
{
return (NULL);
}
};
METHOD struct fb_info * getinfo {
device_t dev;
};
} DEFAULT fb_default_getinfo;