aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ide/ide-proc.c15
-rw-r--r--drivers/ide/pmac.c1
2 files changed, 3 insertions, 13 deletions
diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c
index 45c997430332..4c8c7a620d08 100644
--- a/drivers/ide/ide-proc.c
+++ b/drivers/ide/ide-proc.c
@@ -614,18 +614,7 @@ static int ide_drivers_show(struct seq_file *s, void *p)
614 return 0; 614 return 0;
615} 615}
616 616
617static int ide_drivers_open(struct inode *inode, struct file *file) 617DEFINE_SHOW_ATTRIBUTE(ide_drivers);
618{
619 return single_open(file, &ide_drivers_show, NULL);
620}
621
622static const struct file_operations ide_drivers_operations = {
623 .owner = THIS_MODULE,
624 .open = ide_drivers_open,
625 .read = seq_read,
626 .llseek = seq_lseek,
627 .release = single_release,
628};
629 618
630void proc_ide_create(void) 619void proc_ide_create(void)
631{ 620{
@@ -634,7 +623,7 @@ void proc_ide_create(void)
634 if (!proc_ide_root) 623 if (!proc_ide_root)
635 return; 624 return;
636 625
637 proc_create("drivers", 0, proc_ide_root, &ide_drivers_operations); 626 proc_create("drivers", 0, proc_ide_root, &ide_drivers_fops);
638} 627}
639 628
640void proc_ide_destroy(void) 629void proc_ide_destroy(void)
diff --git a/drivers/ide/pmac.c b/drivers/ide/pmac.c
index c5b902b86b44..203ed4adc04a 100644
--- a/drivers/ide/pmac.c
+++ b/drivers/ide/pmac.c
@@ -920,6 +920,7 @@ static u8 pmac_ide_cable_detect(ide_hwif_t *hwif)
920 struct device_node *root = of_find_node_by_path("/"); 920 struct device_node *root = of_find_node_by_path("/");
921 const char *model = of_get_property(root, "model", NULL); 921 const char *model = of_get_property(root, "model", NULL);
922 922
923 of_node_put(root);
923 /* Get cable type from device-tree. */ 924 /* Get cable type from device-tree. */
924 if (cable && !strncmp(cable, "80-", 3)) { 925 if (cable && !strncmp(cable, "80-", 3)) {
925 /* Some drives fail to detect 80c cable in PowerBook */ 926 /* Some drives fail to detect 80c cable in PowerBook */