[PATCH] openfirmware: generate device table for userspace
This converts the usage of struct of_match to struct of_device_id, similar to pci_device_id. This allows a device table to be generated, which can be parsed by depmod(8) to generate a map file for module loading. In order for hotplug to work with macio devices, patches to module-init-tools and hotplug must be applied. Those patches are available at: ftp://ftp.suse.com/pub/people/jeffm/linux/macio-hotplug/ Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
159f597a8b
commit
5e6557722e
@@ -120,6 +120,7 @@
|
||||
#include <asm/system.h>
|
||||
#include <asm/sections.h>
|
||||
#include <asm/of_device.h>
|
||||
#include <asm/macio.h>
|
||||
|
||||
#include "therm_pm72.h"
|
||||
|
||||
@@ -1986,7 +1987,7 @@ static void fcu_lookup_fans(struct device_node *fcu_node)
|
||||
}
|
||||
}
|
||||
|
||||
static int fcu_of_probe(struct of_device* dev, const struct of_match *match)
|
||||
static int fcu_of_probe(struct of_device* dev, const struct of_device_id *match)
|
||||
{
|
||||
int rc;
|
||||
|
||||
@@ -2009,12 +2010,10 @@ static int fcu_of_remove(struct of_device* dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct of_match fcu_of_match[] =
|
||||
static struct of_device_id fcu_match[] =
|
||||
{
|
||||
{
|
||||
.name = OF_ANY_MATCH,
|
||||
.type = "fcu",
|
||||
.compatible = OF_ANY_MATCH
|
||||
},
|
||||
{},
|
||||
};
|
||||
@@ -2022,7 +2021,7 @@ static struct of_match fcu_of_match[] =
|
||||
static struct of_platform_driver fcu_of_platform_driver =
|
||||
{
|
||||
.name = "temperature",
|
||||
.match_table = fcu_of_match,
|
||||
.match_table = fcu_match,
|
||||
.probe = fcu_of_probe,
|
||||
.remove = fcu_of_remove
|
||||
};
|
||||
|
Reference in New Issue
Block a user