| .. | .. |
|---|
| 83 | 83 | 4 * PAGE_SIZE); |
|---|
| 84 | 84 | } |
|---|
| 85 | 85 | |
|---|
| 86 | | -static const struct file_operations proc_scsi_fops = { |
|---|
| 87 | | - .open = proc_scsi_host_open, |
|---|
| 88 | | - .release = single_release, |
|---|
| 89 | | - .read = seq_read, |
|---|
| 90 | | - .llseek = seq_lseek, |
|---|
| 91 | | - .write = proc_scsi_host_write |
|---|
| 86 | +static const struct proc_ops proc_scsi_ops = { |
|---|
| 87 | + .proc_open = proc_scsi_host_open, |
|---|
| 88 | + .proc_release = single_release, |
|---|
| 89 | + .proc_read = seq_read, |
|---|
| 90 | + .proc_lseek = seq_lseek, |
|---|
| 91 | + .proc_write = proc_scsi_host_write |
|---|
| 92 | 92 | }; |
|---|
| 93 | 93 | |
|---|
| 94 | 94 | /** |
|---|
| .. | .. |
|---|
| 146 | 146 | |
|---|
| 147 | 147 | sprintf(name,"%d", shost->host_no); |
|---|
| 148 | 148 | p = proc_create_data(name, S_IRUGO | S_IWUSR, |
|---|
| 149 | | - sht->proc_dir, &proc_scsi_fops, shost); |
|---|
| 149 | + sht->proc_dir, &proc_scsi_ops, shost); |
|---|
| 150 | 150 | if (!p) |
|---|
| 151 | 151 | printk(KERN_ERR "%s: Failed to register host %d in" |
|---|
| 152 | 152 | "%s\n", __func__, shost->host_no, |
|---|
| .. | .. |
|---|
| 372 | 372 | return err; |
|---|
| 373 | 373 | } |
|---|
| 374 | 374 | |
|---|
| 375 | | -static int always_match(struct device *dev, void *data) |
|---|
| 376 | | -{ |
|---|
| 377 | | - return 1; |
|---|
| 378 | | -} |
|---|
| 379 | | - |
|---|
| 380 | 375 | static inline struct device *next_scsi_device(struct device *start) |
|---|
| 381 | 376 | { |
|---|
| 382 | | - struct device *next = bus_find_device(&scsi_bus_type, start, NULL, |
|---|
| 383 | | - always_match); |
|---|
| 377 | + struct device *next = bus_find_next_device(&scsi_bus_type, start); |
|---|
| 378 | + |
|---|
| 384 | 379 | put_device(start); |
|---|
| 385 | 380 | return next; |
|---|
| 386 | 381 | } |
|---|
| .. | .. |
|---|
| 441 | 436 | return seq_open(file, &scsi_seq_ops); |
|---|
| 442 | 437 | } |
|---|
| 443 | 438 | |
|---|
| 444 | | -static const struct file_operations proc_scsi_operations = { |
|---|
| 445 | | - .owner = THIS_MODULE, |
|---|
| 446 | | - .open = proc_scsi_open, |
|---|
| 447 | | - .read = seq_read, |
|---|
| 448 | | - .write = proc_scsi_write, |
|---|
| 449 | | - .llseek = seq_lseek, |
|---|
| 450 | | - .release = seq_release, |
|---|
| 439 | +static const struct proc_ops scsi_scsi_proc_ops = { |
|---|
| 440 | + .proc_open = proc_scsi_open, |
|---|
| 441 | + .proc_read = seq_read, |
|---|
| 442 | + .proc_write = proc_scsi_write, |
|---|
| 443 | + .proc_lseek = seq_lseek, |
|---|
| 444 | + .proc_release = seq_release, |
|---|
| 451 | 445 | }; |
|---|
| 452 | 446 | |
|---|
| 453 | 447 | /** |
|---|
| .. | .. |
|---|
| 461 | 455 | if (!proc_scsi) |
|---|
| 462 | 456 | goto err1; |
|---|
| 463 | 457 | |
|---|
| 464 | | - pde = proc_create("scsi/scsi", 0, NULL, &proc_scsi_operations); |
|---|
| 458 | + pde = proc_create("scsi/scsi", 0, NULL, &scsi_scsi_proc_ops); |
|---|
| 465 | 459 | if (!pde) |
|---|
| 466 | 460 | goto err2; |
|---|
| 467 | 461 | |
|---|