mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] fix powerbook media bay
@ 2003-03-23  5:19 Paul Mackerras
  2003-03-23 15:38 ` Alan Cox
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Mackerras @ 2003-03-23  5:19 UTC (permalink / raw)
  To: linux-kernel, torvalds

This patch fixes a couple of bugs and compile errors in the powerbook
media bay driver.  It was getting initialized after the IDE subsystem,
whereas it needs to be initialized before so that the IDE subsystem
can see the CD-ROM drive in the bay.

Please apply.

Paul.

diff -urN linux-2.5/drivers/macintosh/mediabay.c pmac-2.5/drivers/macintosh/mediabay.c
--- linux-2.5/drivers/macintosh/mediabay.c	2002-11-12 00:18:24.000000000 +1100
+++ pmac-2.5/drivers/macintosh/mediabay.c	2003-03-22 20:11:14.000000000 +1100
@@ -23,6 +23,7 @@
 #include <linux/stddef.h>
 #include <linux/unistd.h>
 #include <linux/init.h>
+#include <linux/ide.h>
 #include <asm/prom.h>
 #include <asm/pgtable.h>
 #include <asm/io.h>
@@ -493,7 +494,7 @@
 			} while(--timeout);
 			printk(KERN_DEBUG "Timeount waiting IDE in bay %d\n", i);
 			return -ENODEV;
-		} 
+		}
 #endif
 	
 	return -ENODEV;
@@ -567,9 +568,10 @@
 				hw_regs_t hw;
 
 				pmu_suspend();
-				ide_init_hwif_ports(&hw, (ide_ioreg_t) bay->cd_base, (ide_ioreg_t) 0, NULL);
+				ide_init_hwif_ports(&hw, (unsigned long) bay->cd_base, (unsigned long) 0, NULL);
 				hw.irq = bay->cd_irq;
-				bay->cd_index = ide_register_hw(&hw);
+				hw.chipset = ide_pmac;
+				bay->cd_index = ide_register_hw(&hw, NULL);
 				pmu_resume();
 			}
 			if (bay->cd_index == -1) {
@@ -834,4 +836,4 @@
 	return 0;
 }
 
-device_initcall(media_bay_init);
+subsys_initcall(media_bay_init);

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-03-24  1:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-23  5:19 [PATCH] fix powerbook media bay Paul Mackerras
2003-03-23 15:38 ` Alan Cox
2003-03-23 21:34   ` Paul Mackerras
2003-03-23 23:08     ` Alan Cox
2003-03-24  1:49       ` Benjamin Herrenschmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®