On 26/02/16 20:41, Alan wrote: > From: Yu Ning <yu.ning@xxxxxxxxx> > > Enable ACPI bindings for the Goldfish framebuffer device. > > Signed-off-by: Yu Ning <yu.ning@xxxxxxxxx> > Signed-off-by: Jin Qian <jinqian@xxxxxxxxxxx> > Signed-off-by: Alan <alan@xxxxxxxxxxxxxxx> > --- > drivers/video/fbdev/goldfishfb.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/drivers/video/fbdev/goldfishfb.c b/drivers/video/fbdev/goldfishfb.c > index f0e651b..58b33e4 100644 > --- a/drivers/video/fbdev/goldfishfb.c > +++ b/drivers/video/fbdev/goldfishfb.c > @@ -26,6 +26,7 @@ > #include <linux/interrupt.h> > #include <linux/ioport.h> > #include <linux/platform_device.h> > +#include <linux/acpi.h> > > enum { > FB_GET_WIDTH = 0x00, > @@ -310,6 +311,12 @@ static const struct of_device_id goldfish_fb_of_match[] = { > }; > MODULE_DEVICE_TABLE(of, goldfish_fb_of_match); > > +static const struct acpi_device_id goldfish_fb_acpi_match[] = { > + { "GFSH0004", 0 }, I'm not familiar with ACPI, so I need to ask... Where does the ID come from? Is it safe to use that one, and there's no chance for a clash with some other device in the future? > + { }, > +}; > +MODULE_DEVICE_TABLE(acpi, goldfish_fb_acpi_match); > + > static struct platform_driver goldfish_fb_driver = { > .probe = goldfish_fb_probe, > .remove = goldfish_fb_remove, > @@ -317,6 +324,7 @@ static struct platform_driver goldfish_fb_driver = { > .name = "goldfish_fb", > .owner = THIS_MODULE, > .of_match_table = goldfish_fb_of_match, > + .acpi_match_table = ACPI_PTR(goldfish_fb_acpi_match), So does the emulator sometimes use devicetree and sometimes ACPI to match the device? Tomi
Attachment:
signature.asc
Description: OpenPGP digital signature