HardenedBSD/sys/dev/fb/fb_if.m
Emmanuel Vadot 3cbf6518d6 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
2022-06-21 15:52:49 +02:00

17 lines
231 B
Objective-C

#include <sys/bus.h>
#include <sys/fbio.h>
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;