kernel: update 3.14 to 3.14.18
[openwrt.git] / target / linux / ipq806x / patches / 0120-ahci_platform-Drop-support-for-imx53-ahci-platform-d.patch
1 From 0d153bacb749d9291324ef0282ea9d235baca499 Mon Sep 17 00:00:00 2001
2 From: Hans de Goede <hdegoede@redhat.com>
3 Date: Sat, 22 Feb 2014 17:22:54 +0100
4 Subject: [PATCH 120/182] ahci_platform: Drop support for imx53-ahci platform
5  device type
6
7 Since the 3.13 release the ahci_imx driver has proper devicetree enabled
8 support for ahci on imx53 and that is used instead of the old board file
9 created imx53-ahci platform device.
10
11 Note this patch also complete drops the id-table, an id-table is not needed
12 for a single id platform driver, the name field in the driver struct suffices.
13
14 And the code already has an explicit "MODULE_ALIAS("platform:ahci");" so the
15 id-table is not needed for that either.
16
17 Cc: Marek Vasut <marex@denx.de>
18 Signed-off-by: Hans de Goede <hdegoede@redhat.com>
19 Signed-off-by: Tejun Heo <tj@kernel.org>
20 ---
21  drivers/ata/ahci_platform.c |   46 ++++++-------------------------------------
22  1 file changed, 6 insertions(+), 40 deletions(-)
23
24 --- a/drivers/ata/ahci_platform.c
25 +++ b/drivers/ata/ahci_platform.c
26 @@ -28,49 +28,17 @@
27  
28  static void ahci_host_stop(struct ata_host *host);
29  
30 -enum ahci_type {
31 -       AHCI,           /* standard platform ahci */
32 -       IMX53_AHCI,     /* ahci on i.mx53 */
33 -};
34 -
35 -static struct platform_device_id ahci_devtype[] = {
36 -       {
37 -               .name = "ahci",
38 -               .driver_data = AHCI,
39 -       }, {
40 -               .name = "imx53-ahci",
41 -               .driver_data = IMX53_AHCI,
42 -       }, {
43 -               /* sentinel */
44 -       }
45 -};
46 -MODULE_DEVICE_TABLE(platform, ahci_devtype);
47 -
48  struct ata_port_operations ahci_platform_ops = {
49         .inherits       = &ahci_ops,
50         .host_stop      = ahci_host_stop,
51  };
52  EXPORT_SYMBOL_GPL(ahci_platform_ops);
53  
54 -static struct ata_port_operations ahci_platform_retry_srst_ops = {
55 -       .inherits       = &ahci_pmp_retry_srst_ops,
56 -       .host_stop      = ahci_host_stop,
57 -};
58 -
59 -static const struct ata_port_info ahci_port_info[] = {
60 -       /* by features */
61 -       [AHCI] = {
62 -               .flags          = AHCI_FLAG_COMMON,
63 -               .pio_mask       = ATA_PIO4,
64 -               .udma_mask      = ATA_UDMA6,
65 -               .port_ops       = &ahci_platform_ops,
66 -       },
67 -       [IMX53_AHCI] = {
68 -               .flags          = AHCI_FLAG_COMMON,
69 -               .pio_mask       = ATA_PIO4,
70 -               .udma_mask      = ATA_UDMA6,
71 -               .port_ops       = &ahci_platform_retry_srst_ops,
72 -       },
73 +static const struct ata_port_info ahci_port_info = {
74 +       .flags          = AHCI_FLAG_COMMON,
75 +       .pio_mask       = ATA_PIO4,
76 +       .udma_mask      = ATA_UDMA6,
77 +       .port_ops       = &ahci_platform_ops,
78  };
79  
80  static struct scsi_host_template ahci_platform_sht = {
81 @@ -416,7 +384,6 @@ static int ahci_probe(struct platform_de
82  {
83         struct device *dev = &pdev->dev;
84         struct ahci_platform_data *pdata = dev_get_platdata(dev);
85 -       const struct platform_device_id *id = platform_get_device_id(pdev);
86         const struct ata_port_info *pi_template;
87         struct ahci_host_priv *hpriv;
88         int rc;
89 @@ -444,7 +411,7 @@ static int ahci_probe(struct platform_de
90         if (pdata && pdata->ata_port_info)
91                 pi_template = pdata->ata_port_info;
92         else
93 -               pi_template = &ahci_port_info[id ? id->driver_data : 0];
94 +               pi_template = &ahci_port_info;
95  
96         rc = ahci_platform_init_host(pdev, hpriv, pi_template,
97                                      pdata ? pdata->force_port_map : 0,
98 @@ -638,7 +605,6 @@ static struct platform_driver ahci_drive
99                 .of_match_table = ahci_of_match,
100                 .pm = &ahci_pm_ops,
101         },
102 -       .id_table       = ahci_devtype,
103  };
104  module_platform_driver(ahci_driver);
105