* [PATCH] gpio: add MODULE_DEVICE_TABLE
@ 2011-03-10 8:48 Axel Lin
2011-03-12 9:13 ` Grant Likely
0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2011-03-10 8:48 UTC (permalink / raw)
To: linux-kernel; +Cc: Tomoya MORINAGA, Grant Likely, Andrew Morton
The device table is required to load modules based on modaliases.
After adding MODULE_DEVICE_TABLE, below entries will be added to modules.pcimap:
pch_gpio 0x00008086 0x00008803 0xffffffff 0xffffffff 0x00000000 0x00000000 0x0
ml_ioh_gpio 0x000010db 0x0000802e 0xffffffff 0xffffffff 0x00000000 0x00000000 0x0
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
---
drivers/gpio/ml_ioh_gpio.c | 1 +
drivers/gpio/pch_gpio.c | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/gpio/ml_ioh_gpio.c b/drivers/gpio/ml_ioh_gpio.c
index cead8e6..7f6f01a 100644
--- a/drivers/gpio/ml_ioh_gpio.c
+++ b/drivers/gpio/ml_ioh_gpio.c
@@ -326,6 +326,7 @@ static DEFINE_PCI_DEVICE_TABLE(ioh_gpio_pcidev_id) = {
{ PCI_DEVICE(PCI_VENDOR_ID_ROHM, 0x802E) },
{ 0, }
};
+MODULE_DEVICE_TABLE(pci, ioh_gpio_pcidev_id);
static struct pci_driver ioh_gpio_driver = {
.name = "ml_ioh_gpio",
diff --git a/drivers/gpio/pch_gpio.c b/drivers/gpio/pch_gpio.c
index 0eba0a7..2c6af87 100644
--- a/drivers/gpio/pch_gpio.c
+++ b/drivers/gpio/pch_gpio.c
@@ -286,6 +286,7 @@ static DEFINE_PCI_DEVICE_TABLE(pch_gpio_pcidev_id) = {
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x8803) },
{ 0, }
};
+MODULE_DEVICE_TABLE(pci, pch_gpio_pcidev_id);
static struct pci_driver pch_gpio_driver = {
.name = "pch_gpio",
--
1.7.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] gpio: add MODULE_DEVICE_TABLE
2011-03-10 8:48 [PATCH] gpio: add MODULE_DEVICE_TABLE Axel Lin
@ 2011-03-12 9:13 ` Grant Likely
0 siblings, 0 replies; 2+ messages in thread
From: Grant Likely @ 2011-03-12 9:13 UTC (permalink / raw)
To: Axel Lin; +Cc: linux-kernel, Tomoya MORINAGA, Andrew Morton
On Thu, Mar 10, 2011 at 04:48:34PM +0800, Axel Lin wrote:
> The device table is required to load modules based on modaliases.
> After adding MODULE_DEVICE_TABLE, below entries will be added to modules.pcimap:
>
> pch_gpio 0x00008086 0x00008803 0xffffffff 0xffffffff 0x00000000 0x00000000 0x0
> ml_ioh_gpio 0x000010db 0x0000802e 0xffffffff 0xffffffff 0x00000000 0x00000000 0x0
>
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> Cc: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
Applied, thanks.
g.
> ---
> drivers/gpio/ml_ioh_gpio.c | 1 +
> drivers/gpio/pch_gpio.c | 1 +
> 2 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/gpio/ml_ioh_gpio.c b/drivers/gpio/ml_ioh_gpio.c
> index cead8e6..7f6f01a 100644
> --- a/drivers/gpio/ml_ioh_gpio.c
> +++ b/drivers/gpio/ml_ioh_gpio.c
> @@ -326,6 +326,7 @@ static DEFINE_PCI_DEVICE_TABLE(ioh_gpio_pcidev_id) = {
> { PCI_DEVICE(PCI_VENDOR_ID_ROHM, 0x802E) },
> { 0, }
> };
> +MODULE_DEVICE_TABLE(pci, ioh_gpio_pcidev_id);
>
> static struct pci_driver ioh_gpio_driver = {
> .name = "ml_ioh_gpio",
> diff --git a/drivers/gpio/pch_gpio.c b/drivers/gpio/pch_gpio.c
> index 0eba0a7..2c6af87 100644
> --- a/drivers/gpio/pch_gpio.c
> +++ b/drivers/gpio/pch_gpio.c
> @@ -286,6 +286,7 @@ static DEFINE_PCI_DEVICE_TABLE(pch_gpio_pcidev_id) = {
> { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x8803) },
> { 0, }
> };
> +MODULE_DEVICE_TABLE(pci, pch_gpio_pcidev_id);
>
> static struct pci_driver pch_gpio_driver = {
> .name = "pch_gpio",
> --
> 1.7.2
>
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-03-12 9:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-10 8:48 [PATCH] gpio: add MODULE_DEVICE_TABLE Axel Lin
2011-03-12 9:13 ` Grant Likely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox