fbdev: mac_var_to_mode() fix
[safe/jmp/linux-2.6] / drivers / pci / hotplug / cpqphp_sysfs.c
index bbfeed7..e6089bd 100644 (file)
  *
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
 #include <linux/proc_fs.h>
 #include <linux/workqueue.h>
 #include <linux/pci.h>
+#include <linux/pci_hotplug.h>
+#include <linux/smp_lock.h>
 #include <linux/debugfs.h>
 #include "cpqphp.h"
 
@@ -141,7 +142,7 @@ struct ctrl_dbg {
 
 static int open(struct inode *inode, struct file *file)
 {
-       struct controller *ctrl = inode->u.generic_ip;
+       struct controller *ctrl = inode->i_private;
        struct ctrl_dbg *dbg;
        int retval = -ENOMEM;
 
@@ -202,7 +203,7 @@ static int release(struct inode *inode, struct file *file)
        return 0;
 }
 
-static struct file_operations debug_ops = {
+static const struct file_operations debug_ops = {
        .owner = THIS_MODULE,
        .open = open,
        .llseek = lseek,
@@ -225,7 +226,8 @@ void cpqhp_shutdown_debugfs(void)
 
 void cpqhp_create_debugfs_files(struct controller *ctrl)
 {
-       ctrl->dentry = debugfs_create_file(ctrl->pci_dev->dev.bus_id, S_IRUGO, root, ctrl, &debug_ops);
+       ctrl->dentry = debugfs_create_file(dev_name(&ctrl->pci_dev->dev),
+                                          S_IRUGO, root, ctrl, &debug_ops);
 }
 
 void cpqhp_remove_debugfs_files(struct controller *ctrl)