Merge git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-2.6
[powerpc.git] / drivers / misc / hdpuftrs / hdpu_cpustate.c
index bc2b72b..276ba3c 100644 (file)
@@ -18,7 +18,6 @@
 #include <linux/kernel.h>
 #include <linux/spinlock.h>
 #include <linux/miscdevice.h>
-#include <linux/pci.h>
 #include <linux/proc_fs.h>
 #include <linux/platform_device.h>
 #include <asm/uaccess.h>
@@ -26,8 +25,8 @@
 
 #define SKY_CPUSTATE_VERSION           "1.1"
 
-static int hdpu_cpustate_probe(struct device *ddev);
-static int hdpu_cpustate_remove(struct device *ddev);
+static int hdpu_cpustate_probe(struct platform_device *pdev);
+static int hdpu_cpustate_remove(struct platform_device *pdev);
 
 struct cpustate_t cpustate;
 
@@ -158,17 +157,18 @@ static int cpustate_read_proc(char *page, char **start, off_t off,
        return len;
 }
 
-static struct device_driver hdpu_cpustate_driver = {
-       .name = HDPU_CPUSTATE_NAME,
-       .bus = &platform_bus_type,
+static struct platform_driver hdpu_cpustate_driver = {
        .probe = hdpu_cpustate_probe,
        .remove = hdpu_cpustate_remove,
+       .driver = {
+               .name = HDPU_CPUSTATE_NAME,
+       },
 };
 
 /*
  *     The various file operations we support.
  */
-static struct file_operations cpustate_fops = {
+static const struct file_operations cpustate_fops = {
       owner:THIS_MODULE,
       open:cpustate_open,
       release:cpustate_release,
@@ -187,9 +187,8 @@ static struct miscdevice cpustate_dev = {
        &cpustate_fops
 };
 
-static int hdpu_cpustate_probe(struct device *ddev)
+static int hdpu_cpustate_probe(struct platform_device *pdev)
 {
-       struct platform_device *pdev = to_platform_device(ddev);
        struct resource *res;
        struct proc_dir_entry *proc_de;
        int ret;
@@ -217,7 +216,7 @@ static int hdpu_cpustate_probe(struct device *ddev)
        return 0;
 }
 
-static int hdpu_cpustate_remove(struct device *ddev)
+static int hdpu_cpustate_remove(struct platform_device *pdev)
 {
 
        cpustate.set_addr = NULL;
@@ -232,13 +231,13 @@ static int hdpu_cpustate_remove(struct device *ddev)
 static int __init cpustate_init(void)
 {
        int rc;
-       rc = driver_register(&hdpu_cpustate_driver);
+       rc = platform_driver_register(&hdpu_cpustate_driver);
        return rc;
 }
 
 static void __exit cpustate_exit(void)
 {
-       driver_unregister(&hdpu_cpustate_driver);
+       platform_driver_unregister(&hdpu_cpustate_driver);
 }
 
 module_init(cpustate_init);