From patchwork Fri Jan 29 16:05:05 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 43992 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id C95EBB7D36 for ; Sat, 30 Jan 2010 03:20:25 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753872Ab0A2QS6 (ORCPT ); Fri, 29 Jan 2010 11:18:58 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753874Ab0A2QFR (ORCPT ); Fri, 29 Jan 2010 11:05:17 -0500 Received: from mail-fx0-f220.google.com ([209.85.220.220]:53041 "EHLO mail-fx0-f220.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752308Ab0A2QFN (ORCPT ); Fri, 29 Jan 2010 11:05:13 -0500 Received: by mail-fx0-f220.google.com with SMTP id 20so2015120fxm.21 for ; Fri, 29 Jan 2010 08:05:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:date:message-id :in-reply-to:references:subject; bh=Txb1AVLukAdILEd9ej6V4Oxb6zDmppjoUJLyZfJc9Ik=; b=kaFaTBsJluJiKg6Oa/Uk7VadwiiZw2sttfngFkr0Syz3fuFy3+kfrAfBcFMPl7EuYc O2hr7nVcobSpkOM/2MvvPlO1KWcuhtv4gcZhAgaR+fbQOTyG/Zhc33iu1zzHXC4+CFMZ p1bEAOyFArqYCcKonzj33+aErK805UB6FpE5I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:date:message-id:in-reply-to:references:subject; b=gy7UeUuD2D8J/XHE9sN07t6/xTMbtuj6G8demMBYQpRctxFJwYv/AT1EnpP4YrAHhh cst+gGPMsoemEOOLpUHKOmxC1jWi/zwfw/Fa2mHByKOmeQ0gex3gdlhe+44kNCNeQ5dy NEa3GA69K63BainetTqtCmwYs7mwxOmZyRe5g= Received: by 10.223.144.207 with SMTP id a15mr882382fav.70.1264781112544; Fri, 29 Jan 2010 08:05:12 -0800 (PST) Received: from ?127.0.0.1? (chello089079027028.chello.pl [89.79.27.28]) by mx.google.com with ESMTPS id 13sm552032fxm.5.2010.01.29.08.05.11 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 29 Jan 2010 08:05:12 -0800 (PST) From: Bartlomiej Zolnierkiewicz To: linux-ide@vger.kernel.org Cc: Bartlomiej Zolnierkiewicz , linux-kernel@vger.kernel.org Date: Fri, 29 Jan 2010 17:05:05 +0100 Message-Id: <20100129160505.21495.65389.sendpatchset@localhost> In-Reply-To: <20100129160308.21495.14120.sendpatchset@localhost> References: <20100129160308.21495.14120.sendpatchset@localhost> Subject: [PATCH 18/68] ide: split host->dev table Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org From: Bartlomiej Zolnierkiewicz Subject: [PATCH] ide: split host->dev table Split dev table in struct ide_host on dev and dev2 fields to match corresponding fields used in struct ata_host. Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/ide/cy82c693.c | 2 +- drivers/ide/hpt366.c | 6 +++--- drivers/ide/ide-probe.c | 2 +- drivers/ide/ide.c | 4 ++-- drivers/ide/pdc202xx_new.c | 2 +- drivers/ide/setup-pci.c | 6 +++--- include/linux/ide.h | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: b/drivers/ide/cy82c693.c =================================================================== --- a/drivers/ide/cy82c693.c +++ b/drivers/ide/cy82c693.c @@ -179,7 +179,7 @@ static int __devinit cy82c693_init_one(s static void __devexit cy82c693_remove(struct pci_dev *dev) { struct ide_host *host = pci_get_drvdata(dev); - struct pci_dev *dev2 = host->dev[1] ? to_pci_dev(host->dev[1]) : NULL; + struct pci_dev *dev2 = host->dev2 ? to_pci_dev(host->dev2) : NULL; ide_pci_remove(dev); pci_dev_put(dev2); Index: b/drivers/ide/hpt366.c =================================================================== --- a/drivers/ide/hpt366.c +++ b/drivers/ide/hpt366.c @@ -610,7 +610,7 @@ static struct hpt_info *hpt3xx_get_info( struct ide_host *host = dev_get_drvdata(dev); struct hpt_info *info = (struct hpt_info *)host->host_priv; - return dev == host->dev[1] ? info + 1 : info; + return dev == host->dev2 ? info + 1 : info; } /* @@ -943,7 +943,7 @@ static int hpt37x_calibrate_dpll(struct static void hpt3xx_disable_fast_irq(struct pci_dev *dev, u8 mcr_addr) { struct ide_host *host = pci_get_drvdata(dev); - struct hpt_info *info = host->host_priv + (&dev->dev == host->dev[1]); + struct hpt_info *info = host->host_priv + (&dev->dev == host->dev2); u8 chip_type = info->chip_type; u8 new_mcr, old_mcr = 0; @@ -1567,7 +1567,7 @@ static void __devexit hpt366_remove(stru { struct ide_host *host = pci_get_drvdata(dev); struct ide_info *info = host->host_priv; - struct pci_dev *dev2 = host->dev[1] ? to_pci_dev(host->dev[1]) : NULL; + struct pci_dev *dev2 = host->dev2 ? to_pci_dev(host->dev2) : NULL; ide_pci_remove(dev); pci_dev_put(dev2); Index: b/drivers/ide/ide-probe.c =================================================================== --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c @@ -1334,7 +1334,7 @@ struct ide_host *ide_host_alloc(const st return NULL; } - host->dev[0] = dev; + host->dev = dev; if (d) { host->init_chipset = d->init_chipset; Index: b/drivers/ide/ide.c =================================================================== --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c @@ -77,7 +77,7 @@ int ide_device_get(ide_drive_t *drive) if (!get_device(&drive->gendev)) return -ENXIO; - host_dev = drive->hwif->host->dev[0]; + host_dev = drive->hwif->host->dev; module = host_dev ? host_dev->driver->owner : NULL; if (module && !try_module_get(module)) { @@ -99,7 +99,7 @@ EXPORT_SYMBOL_GPL(ide_device_get); void ide_device_put(ide_drive_t *drive) { #ifdef CONFIG_MODULE_UNLOAD - struct device *host_dev = drive->hwif->host->dev[0]; + struct device *host_dev = drive->hwif->host->dev; struct module *module = host_dev ? host_dev->driver->owner : NULL; if (module) Index: b/drivers/ide/pdc202xx_new.c =================================================================== --- a/drivers/ide/pdc202xx_new.c +++ b/drivers/ide/pdc202xx_new.c @@ -517,7 +517,7 @@ static int __devinit pdc202new_init_one( static void __devexit pdc202new_remove(struct pci_dev *dev) { struct ide_host *host = pci_get_drvdata(dev); - struct pci_dev *dev2 = host->dev[1] ? to_pci_dev(host->dev[1]) : NULL; + struct pci_dev *dev2 = host->dev2 ? to_pci_dev(host->dev2) : NULL; ide_pci_remove(dev); pci_dev_put(dev2); Index: b/drivers/ide/setup-pci.c =================================================================== --- a/drivers/ide/setup-pci.c +++ b/drivers/ide/setup-pci.c @@ -556,9 +556,9 @@ int ide_pci_init_two(struct pci_dev *dev goto out; } - host->dev[0] = &dev1->dev; + host->dev = &dev1->dev; if (dev2) - host->dev[1] = &dev2->dev; + host->dev2 = &dev2->dev; host->host_priv = priv; host->irq_flags = IRQF_SHARED; @@ -603,7 +603,7 @@ EXPORT_SYMBOL_GPL(ide_pci_init_one); void ide_pci_remove(struct pci_dev *dev) { struct ide_host *host = pci_get_drvdata(dev); - struct pci_dev *dev2 = host->dev[1] ? to_pci_dev(host->dev[1]) : NULL; + struct pci_dev *dev2 = host->dev2 ? to_pci_dev(host->dev2) : NULL; int bars; if (host->host_flags & IDE_HFLAG_SINGLE) Index: b/include/linux/ide.h =================================================================== --- a/include/linux/ide.h +++ b/include/linux/ide.h @@ -775,7 +775,7 @@ typedef struct hwif_s { struct ide_host { ide_hwif_t *ports[MAX_HOST_PORTS + 1]; unsigned int n_ports; - struct device *dev[2]; + struct device *dev, *dev2; int (*init_chipset)(struct pci_dev *);