lkml.org 
[lkml]   [2010]   [Jan]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
Subject[PATCH 14/68] pata_sis: move short cable handling to pata_sis.h
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: [PATCH] pata_sis: move short cable handling to pata_sis.h

It is a generic code and can be shared between pata_sis & sis5513 drivers.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/ata/pata_sis.c | 30 +-----------------------------
drivers/ata/pata_sis.h | 30 ++++++++++++++++++++++++++++++
2 files changed, 31 insertions(+), 29 deletions(-)

Index: b/drivers/ata/pata_sis.c
===================================================================
--- a/drivers/ata/pata_sis.c
+++ b/drivers/ata/pata_sis.c
@@ -45,35 +45,7 @@ struct sis_chipset {
up code later */
};

-struct sis_laptop {
- u16 device;
- u16 subvendor;
- u16 subdevice;
-};
-
-static const struct sis_laptop sis_laptop[] = {
- /* devid, subvendor, subdev */
- { 0x5513, 0x1043, 0x1107 }, /* ASUS A6K */
- { 0x5513, 0x1734, 0x105F }, /* FSC Amilo A1630 */
- { 0x5513, 0x1071, 0x8640 }, /* EasyNote K5305 */
- /* end marker */
- { 0, }
-};
-
-static int sis_short_ata40(struct pci_dev *dev)
-{
- const struct sis_laptop *lap = &sis_laptop[0];
-
- while (lap->device) {
- if (lap->device == dev->device &&
- lap->subvendor == dev->subsystem_vendor &&
- lap->subdevice == dev->subsystem_device)
- return 1;
- lap++;
- }
-
- return 0;
-}
+#include "pata_sis.h"

/**
* sis_old_port_base - return PCI configuration base for dev
Index: b/drivers/ata/pata_sis.h
===================================================================
--- /dev/null
+++ b/drivers/ata/pata_sis.h
@@ -0,0 +1,30 @@
+
+struct sis_laptop {
+ u16 device;
+ u16 subvendor;
+ u16 subdevice;
+};
+
+static const struct sis_laptop sis_laptop[] = {
+ /* devid, subvendor, subdev */
+ { 0x5513, 0x1043, 0x1107 }, /* ASUS A6K */
+ { 0x5513, 0x1734, 0x105F }, /* FSC Amilo A1630 */
+ { 0x5513, 0x1071, 0x8640 }, /* EasyNote K5305 */
+ /* end marker */
+ { 0, }
+};
+
+static int sis_short_ata40(struct pci_dev *dev)
+{
+ const struct sis_laptop *lap = &sis_laptop[0];
+
+ while (lap->device) {
+ if (lap->device == dev->device &&
+ lap->subvendor == dev->subsystem_vendor &&
+ lap->subdevice == dev->subsystem_device)
+ return 1;
+ lap++;
+ }
+
+ return 0;
+}

\
 
 \ /
  Last update: 2010-01-29 17:07    [W:0.302 / U:0.276 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site