X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fppc%2Fsyslib%2Focp.c;h=50c55622ece9b7d29719877e98e573357431a0b3;hb=refs%2Fheads%2Fvserver;hp=a5156c5179a617ac0ef4baeb109c30170d1d401c;hpb=e812ccbe0c915857ebea6a632bfadc631f7504a9;p=linux-2.6.git diff --git a/arch/ppc/syslib/ocp.c b/arch/ppc/syslib/ocp.c index a5156c517..50c55622e 100644 --- a/arch/ppc/syslib/ocp.c +++ b/arch/ppc/syslib/ocp.c @@ -36,7 +36,6 @@ */ #include -#include #include #include #include @@ -68,7 +67,7 @@ static int ocp_inited; /* Sysfs support */ #define OCP_DEF_ATTR(field, format_string) \ static ssize_t \ -show_##field(struct device *dev, char *buf) \ +show_##field(struct device *dev, struct device_attribute *attr, char *buf) \ { \ struct ocp_device *odev = to_ocp_dev(dev); \ \ @@ -165,7 +164,7 @@ ocp_device_remove(struct device *dev) } static int -ocp_device_suspend(struct device *dev, u32 state) +ocp_device_suspend(struct device *dev, pm_message_t state) { struct ocp_device *ocp_dev = to_ocp_dev(dev); struct ocp_driver *ocp_drv = to_ocp_drv(dev->driver); @@ -189,6 +188,8 @@ ocp_device_resume(struct device *dev) struct bus_type ocp_bus_type = { .name = "ocp", .match = ocp_device_match, + .probe = ocp_device_probe, + .remove = ocp_device_remove, .suspend = ocp_device_suspend, .resume = ocp_device_resume, }; @@ -210,8 +211,6 @@ ocp_register_driver(struct ocp_driver *drv) /* initialize common driver fields */ drv->driver.name = drv->name; drv->driver.bus = &ocp_bus_type; - drv->driver.probe = ocp_device_probe; - drv->driver.remove = ocp_device_remove; /* register with core */ return driver_register(&drv->driver); @@ -451,10 +450,9 @@ ocp_driver_init(void) DBG(("ocp: ocp_driver_init()...\n")); /* Allocate/register primary OCP bus */ - ocp_bus = kmalloc(sizeof(struct device), GFP_KERNEL); + ocp_bus = kzalloc(sizeof(struct device), GFP_KERNEL); if (ocp_bus == NULL) return 1; - memset(ocp_bus, 0, sizeof(struct device)); strcpy(ocp_bus->bus_id, "ocp"); bus_register(&ocp_bus_type);