* [PATCH] goldfish: add goldfish match node for dt driver probe
@ 2015-11-06 5:24 yalin wang
2015-11-06 5:33 ` kbuild test robot
0 siblings, 1 reply; 2+ messages in thread
From: yalin wang @ 2015-11-06 5:24 UTC (permalink / raw)
To: dmitry.torokhov, sre, dbaryshkov, dwmw2, gregkh, jslaby, plagnioj,
tomi.valkeinen, yalin.wang2010, peter.senna, joe, dan.carpenter,
alan, somyaanand214, mahfouz.saif.elyazal, ricardo.ribalda,
ravi2j, linux-input, linux-kernel, linux-pm, devel, linux-fbdev
Signed-off-by: yalin wang <yalin.wang2010@gmail.com>
---
drivers/input/keyboard/goldfish_events.c | 9 +++++++++
drivers/platform/goldfish/goldfish_pipe.c | 11 ++++++++++-
drivers/power/goldfish_battery.c | 11 ++++++++++-
drivers/staging/goldfish/goldfish_audio.c | 11 ++++++++++-
drivers/staging/goldfish/goldfish_nand.c | 9 +++++++++
drivers/tty/goldfish.c | 11 ++++++++++-
drivers/video/fbdev/goldfishfb.c | 10 +++++++++-
7 files changed, 67 insertions(+), 5 deletions(-)
diff --git a/drivers/input/keyboard/goldfish_events.c b/drivers/input/keyboard/goldfish_events.c
index 907e4e2..7b99ab8 100644
--- a/drivers/input/keyboard/goldfish_events.c
+++ b/drivers/input/keyboard/goldfish_events.c
@@ -18,6 +18,7 @@
#include <linux/types.h>
#include <linux/input.h>
#include <linux/kernel.h>
+#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/irq.h>
@@ -178,10 +179,18 @@ static int events_probe(struct platform_device *pdev)
return 0;
}
+#ifdef CONFIG_OF
+static const struct of_device_id goldfish_events_match[] = {
+ { .compatible = "generic,goldfish-events-keypad" },
+ { },
+};
+#endif
+
static struct platform_driver events_driver = {
.probe = events_probe,
.driver = {
.name = "goldfish_events",
+ .of_match_table = of_match_ptr(goldfish_events_match),
},
};
diff --git a/drivers/platform/goldfish/goldfish_pipe.c b/drivers/platform/goldfish/goldfish_pipe.c
index e7a29e2..55b6d7c 100644
--- a/drivers/platform/goldfish/goldfish_pipe.c
+++ b/drivers/platform/goldfish/goldfish_pipe.c
@@ -50,6 +50,7 @@
#include <linux/kernel.h>
#include <linux/spinlock.h>
#include <linux/miscdevice.h>
+#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/poll.h>
#include <linux/sched.h>
@@ -615,11 +616,19 @@ static int goldfish_pipe_remove(struct platform_device *pdev)
return 0;
}
+#ifdef CONFIG_OF
+static const struct of_device_id goldfish_pipe_match[] = {
+ { .compatible = "generic,android-pipe" },
+ { },
+};
+#endif
+
static struct platform_driver goldfish_pipe = {
.probe = goldfish_pipe_probe,
.remove = goldfish_pipe_remove,
.driver = {
- .name = "goldfish_pipe"
+ .name = "goldfish_pipe",
+ .of_match_table = of_match_ptr(goldfish_pipe_match),
}
};
diff --git a/drivers/power/goldfish_battery.c b/drivers/power/goldfish_battery.c
index a50bb98..48b057d 100644
--- a/drivers/power/goldfish_battery.c
+++ b/drivers/power/goldfish_battery.c
@@ -18,6 +18,7 @@
#include <linux/module.h>
#include <linux/err.h>
+#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/power_supply.h>
#include <linux/types.h>
@@ -227,11 +228,19 @@ static int goldfish_battery_remove(struct platform_device *pdev)
return 0;
}
+#ifdef CONFIG_OF
+static const struct of_device_id goldfish_battery_match[] = {
+ { .compatible = "generic,goldfish-battery" },
+ { },
+};
+#endif
+
static struct platform_driver goldfish_battery_device = {
.probe = goldfish_battery_probe,
.remove = goldfish_battery_remove,
.driver = {
- .name = "goldfish-battery"
+ .name = "goldfish-battery",
+ .of_match_table = of_match_ptr(goldfish_battery_match),
}
};
module_platform_driver(goldfish_battery_device);
diff --git a/drivers/staging/goldfish/goldfish_audio.c b/drivers/staging/goldfish/goldfish_audio.c
index b0927e4..f0c5118 100644
--- a/drivers/staging/goldfish/goldfish_audio.c
+++ b/drivers/staging/goldfish/goldfish_audio.c
@@ -18,6 +18,7 @@
#include <linux/module.h>
#include <linux/miscdevice.h>
#include <linux/fs.h>
+#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/types.h>
#include <linux/pci.h>
@@ -344,11 +345,19 @@ static int goldfish_audio_remove(struct platform_device *pdev)
return 0;
}
+#ifdef CONFIG_OF
+static const struct of_device_id goldfish_audio_match[] = {
+ { .compatible = "generic,goldfish-audio" },
+ { },
+};
+#endif
+
static struct platform_driver goldfish_audio_driver = {
.probe = goldfish_audio_probe,
.remove = goldfish_audio_remove,
.driver = {
- .name = "goldfish_audio"
+ .name = "goldfish_audio",
+ .of_match_table = of_match_ptr(goldfish_audio_match),
}
};
diff --git a/drivers/staging/goldfish/goldfish_nand.c b/drivers/staging/goldfish/goldfish_nand.c
index 623353db5..f26de0f 100644
--- a/drivers/staging/goldfish/goldfish_nand.c
+++ b/drivers/staging/goldfish/goldfish_nand.c
@@ -23,6 +23,7 @@
#include <linux/ioport.h>
#include <linux/vmalloc.h>
#include <linux/mtd/mtd.h>
+#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/mutex.h>
#include <linux/goldfish.h>
@@ -430,11 +431,19 @@ static int goldfish_nand_remove(struct platform_device *pdev)
return 0;
}
+#ifdef CONFIG_OF
+static const struct of_device_id goldfish_nand_match[] = {
+ { .compatible = "generic,goldfish-nand" },
+ { },
+};
+#endif
+
static struct platform_driver goldfish_nand_driver = {
.probe = goldfish_nand_probe,
.remove = goldfish_nand_remove,
.driver = {
.name = "goldfish_nand"
+ .of_match_table = of_match_ptr(goldfish_nand_match),
}
};
diff --git a/drivers/tty/goldfish.c b/drivers/tty/goldfish.c
index 0f82c0b..a49f4a2 100644
--- a/drivers/tty/goldfish.c
+++ b/drivers/tty/goldfish.c
@@ -15,6 +15,7 @@
#include <linux/console.h>
#include <linux/interrupt.h>
+#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/tty.h>
#include <linux/tty_flip.h>
@@ -324,11 +325,19 @@ static int goldfish_tty_remove(struct platform_device *pdev)
return 0;
}
+#ifdef CONFIG_OF
+static const struct of_device_id goldfish_tty_match[] = {
+ { .compatible = "generic,goldfish-tty" },
+ { },
+};
+#endif
+
static struct platform_driver goldfish_tty_platform_driver = {
.probe = goldfish_tty_probe,
.remove = goldfish_tty_remove,
.driver = {
- .name = "goldfish_tty"
+ .name = "goldfish_tty",
+ .of_match_table = of_match_ptr(goldfish_tty_match),
}
};
diff --git a/drivers/video/fbdev/goldfishfb.c b/drivers/video/fbdev/goldfishfb.c
index 7f6c9e6..809c502 100644
--- a/drivers/video/fbdev/goldfishfb.c
+++ b/drivers/video/fbdev/goldfishfb.c
@@ -25,6 +25,7 @@
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/ioport.h>
+#include <linux/of.h>
#include <linux/platform_device.h>
enum {
@@ -304,12 +305,19 @@ static int goldfish_fb_remove(struct platform_device *pdev)
return 0;
}
+#ifdef CONFIG_OF
+static const struct of_device_id goldfish_fb_match[] = {
+ { .compatible = "generic,goldfish-fb" },
+ { },
+};
+#endif
static struct platform_driver goldfish_fb_driver = {
.probe = goldfish_fb_probe,
.remove = goldfish_fb_remove,
.driver = {
- .name = "goldfish_fb"
+ .name = "goldfish_fb",
+ .of_match_table = of_match_ptr(goldfish_fb_match),
}
};
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] goldfish: add goldfish match node for dt driver probe
2015-11-06 5:24 [PATCH] goldfish: add goldfish match node for dt driver probe yalin wang
@ 2015-11-06 5:33 ` kbuild test robot
0 siblings, 0 replies; 2+ messages in thread
From: kbuild test robot @ 2015-11-06 5:33 UTC (permalink / raw)
Cc: somyaanand214, linux-fbdev, dmitry.torokhov, peter.senna,
linux-kernel, yalin.wang2010, ricardo.ribalda, devel, dbaryshkov,
tomi.valkeinen, linux-input, plagnioj, dan.carpenter, linux-pm,
jslaby, alan, gregkh, sre, kbuild-all, joe, dwmw2
[-- Attachment #1: Type: text/plain, Size: 1143 bytes --]
Hi yalin,
[auto build test ERROR on staging/staging-testing]
[also build test ERROR on v4.3 next-20151105]
url: https://github.com/0day-ci/linux/commits/yalin-wang/goldfish-add-goldfish-match-node-for-dt-driver-probe/20151106-132647
config: x86_64-allyesconfig (attached as .config)
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All errors (new ones prefixed by >>):
>> drivers/staging/goldfish/goldfish_nand.c:446:3: error: request for member 'of_match_table' in something not a structure or union
.of_match_table = of_match_ptr(goldfish_nand_match),
^
vim +/of_match_table +446 drivers/staging/goldfish/goldfish_nand.c
440
441 static struct platform_driver goldfish_nand_driver = {
442 .probe = goldfish_nand_probe,
443 .remove = goldfish_nand_remove,
444 .driver = {
445 .name = "goldfish_nand"
> 446 .of_match_table = of_match_ptr(goldfish_nand_match),
447 }
448 };
449
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 50533 bytes --]
[-- Attachment #3: Type: text/plain, Size: 169 bytes --]
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-11-06 5:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-06 5:24 [PATCH] goldfish: add goldfish match node for dt driver probe yalin wang
2015-11-06 5:33 ` kbuild test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox