linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Mackerras <paulus@samba.org>
To: linux-kernel@vger.kernel.org, torvalds@transmeta.com
Subject: [PATCH] fix powerbook media bay
Date: Sun, 23 Mar 2003 16:19:30 +1100 (EST)	[thread overview]
Message-ID: <15997.17378.538276.91950@nanango.paulus.ozlabs.org> (raw)

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);

             reply	other threads:[~2003-03-23  5:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-23  5:19 Paul Mackerras [this message]
2003-03-23 15:38 ` [PATCH] fix powerbook media bay Alan Cox
2003-03-23 21:34   ` Paul Mackerras
2003-03-23 23:08     ` Alan Cox
2003-03-24  1:49       ` Benjamin Herrenschmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=15997.17378.538276.91950@nanango.paulus.ozlabs.org \
    --to=paulus@samba.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).