linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* powerpc/pmac: Fixup regression in probe with no media bay
@ 2009-12-09  6:05 Benjamin Herrenschmidt
  0 siblings, 0 replies; only message in thread
From: Benjamin Herrenschmidt @ 2009-12-09  6:05 UTC (permalink / raw)
  To: linuxppc-dev

A little thinko in my media bay rework breaks the old IDE driver on machines
with no bay. This fixes it.

Note: I haven't pushed my new -next out yet with my rework in, so I'll locally
fold that patch in the rework to avoid bisection breakage and push the result
into my -next branch

Ben.

Index: linux-work/drivers/ide/pmac.c
===================================================================
--- linux-work.orig/drivers/ide/pmac.c	2009-12-09 16:55:59.000000000 +1100
+++ linux-work/drivers/ide/pmac.c	2009-12-09 16:56:27.000000000 +1100
@@ -1078,7 +1078,8 @@ static int __devinit pmac_ide_setup_devi
 	sanitize_timings(pmif);
 
 	/* If we are on a media bay, wait for it to settle and lock it */
-	lock_media_bay(pmif->mdev->media_bay);
+	if (pmif->mdev)
+		lock_media_bay(pmif->mdev->media_bay);
 
 	host = ide_host_alloc(&d, hws, 1);
 	if (host == NULL) {
@@ -1115,7 +1116,8 @@ static int __devinit pmac_ide_setup_devi
 	if (rc)
 		pmif->hwif = NULL;
 
-	unlock_media_bay(pmif->mdev->media_bay);
+	if (pmif->mdev)
+		unlock_media_bay(pmif->mdev->media_bay);
 
  bail:
 	if (rc && host)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-12-09  6:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-09  6:05 powerpc/pmac: Fixup regression in probe with no media bay Benjamin Herrenschmidt

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