Commit fc8cc677 authored by Linus Torvalds's avatar Linus Torvalds

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide

Pull IDE changes from David Miller:
 "Mostly cleanups, and changes part of tree-wide adjustments, this code
  is in deep freeze so that's pretty much what we expect these days"

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide:
  ide: sgiioc4: Staticize ioc4_ide_attach_one()
  ide: palm_bk3710: add missing __iomem annotation
  ide: use dev_get_platdata()
  ide-disk_proc: use macro to replace magic number
  ide: replace strict_strtol() with kstrtol()
parents b14662ca 64110c16
...@@ -132,7 +132,7 @@ static int __init amiga_gayle_ide_probe(struct platform_device *pdev) ...@@ -132,7 +132,7 @@ static int __init amiga_gayle_ide_probe(struct platform_device *pdev)
if (!request_mem_region(res->start, resource_size(res), "IDE")) if (!request_mem_region(res->start, resource_size(res), "IDE"))
return -EBUSY; return -EBUSY;
pdata = pdev->dev.platform_data; pdata = dev_get_platdata(&pdev->dev);
pr_info("ide: Gayle IDE controller (A%u style%s)\n", pr_info("ide: Gayle IDE controller (A%u style%s)\n",
pdata->explicit_ack ? 1200 : 4000, pdata->explicit_ack ? 1200 : 4000,
ide_doubler ? ", IDE doubler" : ""); ide_doubler ? ", IDE doubler" : "");
......
...@@ -141,8 +141,8 @@ static int ide_cmd_ioctl(ide_drive_t *drive, unsigned long arg) ...@@ -141,8 +141,8 @@ static int ide_cmd_ioctl(ide_drive_t *drive, unsigned long arg)
if (args[0] == ATA_CMD_SMART) { if (args[0] == ATA_CMD_SMART) {
tf->nsect = args[3]; tf->nsect = args[3];
tf->lbal = args[1]; tf->lbal = args[1];
tf->lbam = 0x4f; tf->lbam = ATA_SMART_LBAM_PASS;
tf->lbah = 0xc2; tf->lbah = ATA_SMART_LBAH_PASS;
cmd.valid.out.tf = IDE_VALID_OUT_TF; cmd.valid.out.tf = IDE_VALID_OUT_TF;
cmd.valid.in.tf = IDE_VALID_NSECT; cmd.valid.in.tf = IDE_VALID_NSECT;
} else { } else {
......
...@@ -116,8 +116,10 @@ ssize_t ide_park_store(struct device *dev, struct device_attribute *attr, ...@@ -116,8 +116,10 @@ ssize_t ide_park_store(struct device *dev, struct device_attribute *attr,
long int input; long int input;
int rc; int rc;
rc = strict_strtol(buf, 10, &input); rc = kstrtol(buf, 10, &input);
if (rc || input < -2) if (rc)
return rc;
if (input < -2)
return -EINVAL; return -EINVAL;
if (input > MAX_PARK_TIMEOUT) { if (input > MAX_PARK_TIMEOUT) {
input = MAX_PARK_TIMEOUT; input = MAX_PARK_TIMEOUT;
......
...@@ -56,7 +56,7 @@ static int plat_ide_probe(struct platform_device *pdev) ...@@ -56,7 +56,7 @@ static int plat_ide_probe(struct platform_device *pdev)
struct ide_hw hw, *hws[] = { &hw }; struct ide_hw hw, *hws[] = { &hw };
struct ide_port_info d = platform_ide_port_info; struct ide_port_info d = platform_ide_port_info;
pdata = pdev->dev.platform_data; pdata = dev_get_platdata(&pdev->dev);
/* get a pointer to the register memory */ /* get a pointer to the register memory */
res_base = platform_get_resource(pdev, IORESOURCE_IO, 0); res_base = platform_get_resource(pdev, IORESOURCE_IO, 0);
......
...@@ -191,7 +191,7 @@ static void palm_bk3710_setpiomode(void __iomem *base, ide_drive_t *mate, ...@@ -191,7 +191,7 @@ static void palm_bk3710_setpiomode(void __iomem *base, ide_drive_t *mate,
static void palm_bk3710_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive) static void palm_bk3710_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive)
{ {
int is_slave = drive->dn & 1; int is_slave = drive->dn & 1;
void __iomem *base = (void *)hwif->dma_base; void __iomem *base = (void __iomem *)hwif->dma_base;
const u8 xferspeed = drive->dma_mode; const u8 xferspeed = drive->dma_mode;
if (xferspeed >= XFER_UDMA_0) { 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,7 +209,7 @@ static void palm_bk3710_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive)
unsigned int cycle_time; unsigned int cycle_time;
int is_slave = drive->dn & 1; int is_slave = drive->dn & 1;
ide_drive_t *mate; ide_drive_t *mate;
void __iomem *base = (void *)hwif->dma_base; void __iomem *base = (void __iomem *)hwif->dma_base;
const u8 pio = drive->pio_mode - XFER_PIO_0; const u8 pio = drive->pio_mode - XFER_PIO_0;
/* /*
......
...@@ -600,7 +600,7 @@ static unsigned int pci_init_sgiioc4(struct pci_dev *dev) ...@@ -600,7 +600,7 @@ static unsigned int pci_init_sgiioc4(struct pci_dev *dev)
return ret; return ret;
} }
int ioc4_ide_attach_one(struct ioc4_driver_data *idd) static int ioc4_ide_attach_one(struct ioc4_driver_data *idd)
{ {
/* /*
* PCI-RT does not bring out IDE connection. * PCI-RT does not bring out IDE connection.
......
...@@ -58,7 +58,7 @@ static void tx4938ide_tune_ebusc(unsigned int ebus_ch, ...@@ -58,7 +58,7 @@ static void tx4938ide_tune_ebusc(unsigned int ebus_ch,
static void tx4938ide_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive) static void tx4938ide_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive)
{ {
struct tx4938ide_platform_info *pdata = hwif->dev->platform_data; struct tx4938ide_platform_info *pdata = dev_get_platdata(hwif->dev);
u8 safe = drive->pio_mode - XFER_PIO_0; u8 safe = drive->pio_mode - XFER_PIO_0;
ide_drive_t *pair; ide_drive_t *pair;
...@@ -132,7 +132,7 @@ static int __init tx4938ide_probe(struct platform_device *pdev) ...@@ -132,7 +132,7 @@ static int __init tx4938ide_probe(struct platform_device *pdev)
struct ide_hw hw, *hws[] = { &hw }; struct ide_hw hw, *hws[] = { &hw };
struct ide_host *host; struct ide_host *host;
struct resource *res; struct resource *res;
struct tx4938ide_platform_info *pdata = pdev->dev.platform_data; struct tx4938ide_platform_info *pdata = dev_get_platdata(&pdev->dev);
int irq, ret, i; int irq, ret, i;
unsigned long mapbase, mapctl; unsigned long mapbase, mapctl;
struct ide_port_info d = tx4938ide_port_info; struct ide_port_info d = tx4938ide_port_info;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment