X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fscsi%2Fscsi_proc.c;h=c6a904a45bf9871677e50ea762ceaf3c468ae049;hb=e9ba9698187ddbc0c5bfcf41de0349a662d23d02;hp=3a1c99d5c775482efedcf2a550218c23e3cf139d;hpb=1dbbb6077426f8ce63d6a59c5ac6613e1689cbde;p=linux-2.6 diff --git a/drivers/scsi/scsi_proc.c b/drivers/scsi/scsi_proc.c index 3a1c99d5c7..c6a904a45b 100644 --- a/drivers/scsi/scsi_proc.c +++ b/drivers/scsi/scsi_proc.c @@ -114,7 +114,7 @@ void scsi_proc_hostdir_add(struct scsi_host_template *sht) sht->proc_dir = proc_mkdir(sht->proc_name, proc_scsi); if (!sht->proc_dir) printk(KERN_ERR "%s: proc_mkdir failed for %s\n", - __FUNCTION__, sht->proc_name); + __func__, sht->proc_name); else sht->proc_dir->owner = sht->module; } @@ -157,7 +157,7 @@ void scsi_proc_host_add(struct Scsi_Host *shost) sht->proc_dir, proc_scsi_read, shost); if (!p) { printk(KERN_ERR "%s: Failed to register host %d in" - "%s\n", __FUNCTION__, shost->host_no, + "%s\n", __func__, shost->host_no, sht->proc_name); return; } @@ -413,6 +413,7 @@ static int proc_scsi_open(struct inode *inode, struct file *file) } static const struct file_operations proc_scsi_operations = { + .owner = THIS_MODULE, .open = proc_scsi_open, .read = seq_read, .write = proc_scsi_write, @@ -431,10 +432,9 @@ int __init scsi_init_procfs(void) if (!proc_scsi) goto err1; - pde = create_proc_entry("scsi/scsi", 0, NULL); + pde = proc_create("scsi/scsi", 0, NULL, &proc_scsi_operations); if (!pde) goto err2; - pde->proc_fops = &proc_scsi_operations; return 0;