Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[cascardo/linux.git] / drivers / scsi / megaraid.c
index 77d9d38..7fc6e06 100644 (file)
@@ -92,7 +92,7 @@ static struct mega_hbas mega_hbas[MAX_CONTROLLERS];
 /*
  * The File Operations structure for the serial/ioctl interface of the driver
  */
-static struct file_operations megadev_fops = {
+static const struct file_operations megadev_fops = {
        .owner          = THIS_MODULE,
        .ioctl          = megadev_ioctl,
        .open           = megadev_open,
@@ -2088,7 +2088,7 @@ megaraid_abort_and_reset(adapter_t *adapter, Scsi_Cmnd *cmd, int aor)
 static inline int
 make_local_pdev(adapter_t *adapter, struct pci_dev **pdev)
 {
-       *pdev = kmalloc(sizeof(struct pci_dev), GFP_KERNEL);
+       *pdev = alloc_pci_dev();
 
        if( *pdev == NULL ) return -1;
 
@@ -5072,7 +5072,7 @@ static int __init megaraid_init(void)
                                "megaraid: failed to create megaraid root\n");
        }
 #endif
-       error = pci_module_init(&megaraid_pci_driver);
+       error = pci_register_driver(&megaraid_pci_driver);
        if (error) {
 #ifdef CONFIG_PROC_FS
                remove_proc_entry("megaraid", &proc_root);