Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S270663AbTHJUcW (ORCPT ); Sun, 10 Aug 2003 16:32:22 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S270673AbTHJUcV (ORCPT ); Sun, 10 Aug 2003 16:32:21 -0400 Received: from AMarseille-201-1-6-8.w80-11.abo.wanadoo.fr ([80.11.137.8]:8487 "EHLO gaston") by vger.kernel.org with ESMTP id S270663AbTHJUcR (ORCPT ); Sun, 10 Aug 2003 16:32:17 -0400 Subject: Re: [PATCH] IDE (& PowerMac): Let an hwif have a real parent From: Benjamin Herrenschmidt To: Bartlomiej Zolnierkiewicz , Linus Torvalds Cc: linux-kernel mailing list In-Reply-To: References: Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1060547504.1405.30.camel@gaston> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.3 Date: 10 Aug 2003 22:31:45 +0200 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1250 Lines: 38 > Looks good. > > > Please apply, > > Ben. > > Can you fix intendation, or I should do it? Hrm... I don't know how I fucked it up, probably when merging between my trees. Here's the fixed version: diff -urN linux-2.5/drivers/ide/ide-probe.c linux-2.5-benh-merge/drivers/ide/ide-probe.c --- linux-2.5/drivers/ide/ide-probe.c 2003-08-09 11:05:27.000000000 +0200 +++ linux-2.5-benh-merge/drivers/ide/ide-probe.c 2003-08-10 22:30:14.000000000 +0200 @@ -650,10 +650,13 @@ strlcpy(hwif->gendev.bus_id,hwif->name,BUS_ID_SIZE); snprintf(hwif->gendev.name,DEVICE_NAME_SIZE,"IDE Controller"); hwif->gendev.driver_data = hwif; - if (hwif->pci_dev) - hwif->gendev.parent = &hwif->pci_dev->dev; - else - hwif->gendev.parent = NULL; /* Would like to do = &device_legacy */ + if (hwif->gendev.parent == NULL) { + if (hwif->pci_dev) + hwif->gendev.parent = &hwif->pci_dev->dev; + else + /* Would like to do = &device_legacy */ + hwif->gendev.parent = NULL; + } device_register(&hwif->gendev); } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/