linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: linuxppc-dev <linuxppc-dev@lists.ozlabs.org>
Subject: powerpc/pmac: Fixup regression in probe with no media bay
Date: Wed, 09 Dec 2009 17:05:32 +1100	[thread overview]
Message-ID: <1260338732.16132.10.camel@pasglop> (raw)

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)

                 reply	other threads:[~2009-12-09  6:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1260338732.16132.10.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /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).