From patchwork Fri Jan 29 16:04:53 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 43939 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 5155FB7D2A for ; Sat, 30 Jan 2010 03:06:41 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753676Ab0A2QFh (ORCPT ); Fri, 29 Jan 2010 11:05:37 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754171Ab0A2QFe (ORCPT ); Fri, 29 Jan 2010 11:05:34 -0500 Received: from fg-out-1718.google.com ([72.14.220.154]:45357 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751059Ab0A2QFa (ORCPT ); Fri, 29 Jan 2010 11:05:30 -0500 Received: by fg-out-1718.google.com with SMTP id l26so862599fgb.1 for ; Fri, 29 Jan 2010 08:05:29 -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=QIRgZGYUILj8tm0QXXsfssRVV1BB5CbsunuiUC1gYO0=; b=MbNuLQw1jrgJ5xYgH0CLpKfeIfMx8znrtFuXFp9ZemV+gGuiR/rrqBq+7FRjfR2X6s GRLlDmsm4qHWlWOuDEb+UjjqYzRt8x5e0NiZjr09wyQn1IP8TY1iJPfIyNNk0tbN4P1v VHjv5IE8Qf+SJHJzGZCxJZFBLnKg0MyiElH0E= 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=wgAYRcV/EjuONrGwYI2VwdF1T3r2V8f9BbzNa5i1cenqcpLTxCjhVZ6fKEko00VFp0 k8epSiEeH5gGiKylL1Ycz0u2/D1iVxUF6SWP6Zs9zlharHauvNWlB4tUN6cXX9Tk8Ys6 VyW9iWdgpMPSJ4l2qoXJEM14BQ7aC8SyJ6n5Q= Received: by 10.87.11.25 with SMTP id o25mr2220788fgi.23.1264781099556; Fri, 29 Jan 2010 08:04:59 -0800 (PST) Received: from ?127.0.0.1? (chello089079027028.chello.pl [89.79.27.28]) by mx.google.com with ESMTPS id 16sm551197fxm.8.2010.01.29.08.04.58 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 29 Jan 2010 08:04:59 -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:04:53 +0100 Message-Id: <20100129160453.21495.30904.sendpatchset@localhost> In-Reply-To: <20100129160308.21495.14120.sendpatchset@localhost> References: <20100129160308.21495.14120.sendpatchset@localhost> Subject: [PATCH 16/68] pata_via: move short cable handling to pata_via.h Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org From: Bartlomiej Zolnierkiewicz Subject: [PATCH] pata_via: move short cable handling to pata_via.h It is a generic code and can be shared between pata_via & via82cxxx drivers. Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/ata/pata_via.c | 28 +--------------------------- drivers/ata/pata_via.h | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 27 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/ata/pata_via.c =================================================================== --- a/drivers/ata/pata_via.c +++ b/drivers/ata/pata_via.c @@ -60,7 +60,6 @@ #include #include #include -#include #define DRV_NAME "pata_via" #define DRV_VERSION "0.3.4" @@ -127,32 +126,7 @@ struct via_port { u8 cached_device; }; -/* - * Cable special cases - */ - -static const struct dmi_system_id cable_dmi_table[] = { - { - .ident = "Acer Ferrari 3400", - .matches = { - DMI_MATCH(DMI_BOARD_VENDOR, "Acer,Inc."), - DMI_MATCH(DMI_BOARD_NAME, "Ferrari 3400"), - }, - }, - { } -}; - -static int via_cable_override(struct pci_dev *pdev) -{ - /* Systems by DMI */ - if (dmi_check_system(cable_dmi_table)) - return 1; - /* Arima W730-K8/Targa Visionary 811/... */ - if (pdev->subsystem_vendor == 0x161F && pdev->subsystem_device == 0x2032) - return 1; - return 0; -} - +#include "pata_via.h" /** * via_cable_detect - cable detection Index: b/drivers/ata/pata_via.h =================================================================== --- /dev/null +++ b/drivers/ata/pata_via.h @@ -0,0 +1,29 @@ + +#include + +/* + * Cable special cases + */ + +static const struct dmi_system_id cable_dmi_table[] = { + { + .ident = "Acer Ferrari 3400", + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "Acer,Inc."), + DMI_MATCH(DMI_BOARD_NAME, "Ferrari 3400"), + }, + }, + { } +}; + +static int via_cable_override(struct pci_dev *pdev) +{ + /* Systems by DMI */ + if (dmi_check_system(cable_dmi_table)) + return 1; + /* Arima W730-K8/Targa Visionary 811/... */ + if (pdev->subsystem_vendor == 0x161F && + pdev->subsystem_device == 0x2032) + return 1; + return 0; +}