]> git.baikalelectronics.ru Git - kernel.git/commit
video: fbdev: gbefb: Only instantiate device when built for IP32
authorMark Brown <broonie@kernel.org>
Tue, 21 Sep 2021 21:21:02 +0000 (22:21 +0100)
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Wed, 6 Oct 2021 09:12:28 +0000 (11:12 +0200)
commit0670ef3742a04fc3ad052bd1c6ce529e0baf1f15
tree5277e926d5be62ca98162363e6b648ced3306088
parentf476e1d2cc8d4aa58e4e8cf3d13b6279d38f1cf4
video: fbdev: gbefb: Only instantiate device when built for IP32

The gbefb driver not only registers a driver but also the device for that
driver. This is all well and good when run on the IP32 machines that are
supported by the driver but since the driver supports building with
COMPILE_TEST we might also be building on other platforms which do not have
this hardware and will crash instantiating the driver. Add an IS_ENABLED()
check so we compile out the device registration if we don't have the Kconfig
option for the machine enabled.

Fixes: afb7c1efb231f37486 ("video: fbdev: gbefb: add COMPILE_TEST support")
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20210921212102.30803-1-broonie@kernel.org
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
drivers/video/fbdev/gbefb.c