diff options
-rw-r--r-- | drivers/ide/gayle.c | 2 | ||||
-rw-r--r-- | drivers/ide/ide-ioctls.c | 4 | ||||
-rw-r--r-- | drivers/ide/ide-park.c | 6 | ||||
-rw-r--r-- | drivers/ide/ide_platform.c | 2 | ||||
-rw-r--r-- | drivers/ide/palm_bk3710.c | 4 | ||||
-rw-r--r-- | drivers/ide/sgiioc4.c | 2 | ||||
-rw-r--r-- | drivers/ide/tx4938ide.c | 4 |
7 files changed, 13 insertions, 11 deletions
diff --git a/drivers/ide/gayle.c b/drivers/ide/gayle.c index 0a8440ae0565..97a2f9dc75d8 100644 --- a/drivers/ide/gayle.c +++ b/drivers/ide/gayle.c | |||
@@ -132,7 +132,7 @@ static int __init amiga_gayle_ide_probe(struct platform_device *pdev) | |||
132 | if (!request_mem_region(res->start, resource_size(res), "IDE")) | 132 | if (!request_mem_region(res->start, resource_size(res), "IDE")) |
133 | return -EBUSY; | 133 | return -EBUSY; |
134 | 134 | ||
135 | pdata = pdev->dev.platform_data; | 135 | pdata = dev_get_platdata(&pdev->dev); |
136 | pr_info("ide: Gayle IDE controller (A%u style%s)\n", | 136 | pr_info("ide: Gayle IDE controller (A%u style%s)\n", |
137 | pdata->explicit_ack ? 1200 : 4000, | 137 | pdata->explicit_ack ? 1200 : 4000, |
138 | ide_doubler ? ", IDE doubler" : ""); | 138 | ide_doubler ? ", IDE doubler" : ""); |
diff --git a/drivers/ide/ide-ioctls.c b/drivers/ide/ide-ioctls.c index 4d19eb9772a1..6233fa2cb8a9 100644 --- a/drivers/ide/ide-ioctls.c +++ b/drivers/ide/ide-ioctls.c | |||
@@ -141,8 +141,8 @@ static int ide_cmd_ioctl(ide_drive_t *drive, unsigned long arg) | |||
141 | if (args[0] == ATA_CMD_SMART) { | 141 | if (args[0] == ATA_CMD_SMART) { |
142 | tf->nsect = args[3]; | 142 | tf->nsect = args[3]; |
143 | tf->lbal = args[1]; | 143 | tf->lbal = args[1]; |
144 | tf->lbam = 0x4f; | 144 | tf->lbam = ATA_SMART_LBAM_PASS; |
145 | tf->lbah = 0xc2; | 145 | tf->lbah = ATA_SMART_LBAH_PASS; |
146 | cmd.valid.out.tf = IDE_VALID_OUT_TF; | 146 | cmd.valid.out.tf = IDE_VALID_OUT_TF; |
147 | cmd.valid.in.tf = IDE_VALID_NSECT; | 147 | cmd.valid.in.tf = IDE_VALID_NSECT; |
148 | } else { | 148 | } else { |
diff --git a/drivers/ide/ide-park.c b/drivers/ide/ide-park.c index 6ab9ab2a5081..f41558a0bcd1 100644 --- a/drivers/ide/ide-park.c +++ b/drivers/ide/ide-park.c | |||
@@ -116,8 +116,10 @@ ssize_t ide_park_store(struct device *dev, struct device_attribute *attr, | |||
116 | long int input; | 116 | long int input; |
117 | int rc; | 117 | int rc; |
118 | 118 | ||
119 | rc = strict_strtol(buf, 10, &input); | 119 | rc = kstrtol(buf, 10, &input); |
120 | if (rc || input < -2) | 120 | if (rc) |
121 | return rc; | ||
122 | if (input < -2) | ||
121 | return -EINVAL; | 123 | return -EINVAL; |
122 | if (input > MAX_PARK_TIMEOUT) { | 124 | if (input > MAX_PARK_TIMEOUT) { |
123 | input = MAX_PARK_TIMEOUT; | 125 | input = MAX_PARK_TIMEOUT; |
diff --git a/drivers/ide/ide_platform.c b/drivers/ide/ide_platform.c index ba4bfbead24b..a8b4b6af80e7 100644 --- a/drivers/ide/ide_platform.c +++ b/drivers/ide/ide_platform.c | |||
@@ -56,7 +56,7 @@ static int plat_ide_probe(struct platform_device *pdev) | |||
56 | struct ide_hw hw, *hws[] = { &hw }; | 56 | struct ide_hw hw, *hws[] = { &hw }; |
57 | struct ide_port_info d = platform_ide_port_info; | 57 | struct ide_port_info d = platform_ide_port_info; |
58 | 58 | ||
59 | pdata = pdev->dev.platform_data; | 59 | pdata = dev_get_platdata(&pdev->dev); |
60 | 60 | ||
61 | /* get a pointer to the register memory */ | 61 | /* get a pointer to the register memory */ |
62 | res_base = platform_get_resource(pdev, IORESOURCE_IO, 0); | 62 | res_base = platform_get_resource(pdev, IORESOURCE_IO, 0); |
diff --git a/drivers/ide/palm_bk3710.c b/drivers/ide/palm_bk3710.c index 6107cc4ee012..ba20d18c0373 100644 --- a/drivers/ide/palm_bk3710.c +++ b/drivers/ide/palm_bk3710.c | |||
@@ -191,7 +191,7 @@ static void palm_bk3710_setpiomode(void __iomem *base, ide_drive_t *mate, | |||
191 | static void palm_bk3710_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive) | 191 | static void palm_bk3710_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive) |
192 | { | 192 | { |
193 | int is_slave = drive->dn & 1; | 193 | int is_slave = drive->dn & 1; |
194 | void __iomem *base = (void *)hwif->dma_base; | 194 | void __iomem *base = (void __iomem *)hwif->dma_base; |
195 | const u8 xferspeed = drive->dma_mode; | 195 | const u8 xferspeed = drive->dma_mode; |
196 | 196 | ||
197 | if (xferspeed >= XFER_UDMA_0) { | 197 | if (xferspeed >= XFER_UDMA_0) { |
@@ -209,7 +209,7 @@ static void palm_bk3710_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive) | |||
209 | unsigned int cycle_time; | 209 | unsigned int cycle_time; |
210 | int is_slave = drive->dn & 1; | 210 | int is_slave = drive->dn & 1; |
211 | ide_drive_t *mate; | 211 | ide_drive_t *mate; |
212 | void __iomem *base = (void *)hwif->dma_base; | 212 | void __iomem *base = (void __iomem *)hwif->dma_base; |
213 | const u8 pio = drive->pio_mode - XFER_PIO_0; | 213 | const u8 pio = drive->pio_mode - XFER_PIO_0; |
214 | 214 | ||
215 | /* | 215 | /* |
diff --git a/drivers/ide/sgiioc4.c b/drivers/ide/sgiioc4.c index a5ca179a83b3..63761db61384 100644 --- a/drivers/ide/sgiioc4.c +++ b/drivers/ide/sgiioc4.c | |||
@@ -600,7 +600,7 @@ out: | |||
600 | return ret; | 600 | return ret; |
601 | } | 601 | } |
602 | 602 | ||
603 | int ioc4_ide_attach_one(struct ioc4_driver_data *idd) | 603 | static int ioc4_ide_attach_one(struct ioc4_driver_data *idd) |
604 | { | 604 | { |
605 | /* | 605 | /* |
606 | * PCI-RT does not bring out IDE connection. | 606 | * PCI-RT does not bring out IDE connection. |
diff --git a/drivers/ide/tx4938ide.c b/drivers/ide/tx4938ide.c index ede8575ac7d5..68edd4f58a28 100644 --- a/drivers/ide/tx4938ide.c +++ b/drivers/ide/tx4938ide.c | |||
@@ -58,7 +58,7 @@ static void tx4938ide_tune_ebusc(unsigned int ebus_ch, | |||
58 | 58 | ||
59 | static void tx4938ide_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive) | 59 | static void tx4938ide_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive) |
60 | { | 60 | { |
61 | struct tx4938ide_platform_info *pdata = hwif->dev->platform_data; | 61 | struct tx4938ide_platform_info *pdata = dev_get_platdata(hwif->dev); |
62 | u8 safe = drive->pio_mode - XFER_PIO_0; | 62 | u8 safe = drive->pio_mode - XFER_PIO_0; |
63 | ide_drive_t *pair; | 63 | ide_drive_t *pair; |
64 | 64 | ||
@@ -132,7 +132,7 @@ static int __init tx4938ide_probe(struct platform_device *pdev) | |||
132 | struct ide_hw hw, *hws[] = { &hw }; | 132 | struct ide_hw hw, *hws[] = { &hw }; |
133 | struct ide_host *host; | 133 | struct ide_host *host; |
134 | struct resource *res; | 134 | struct resource *res; |
135 | struct tx4938ide_platform_info *pdata = pdev->dev.platform_data; | 135 | struct tx4938ide_platform_info *pdata = dev_get_platdata(&pdev->dev); |
136 | int irq, ret, i; | 136 | int irq, ret, i; |
137 | unsigned long mapbase, mapctl; | 137 | unsigned long mapbase, mapctl; |
138 | struct ide_port_info d = tx4938ide_port_info; | 138 | struct ide_port_info d = tx4938ide_port_info; |