mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-10 15:10:38 +00:00
of/mtd: nand: fix build breakage in drivers
Fixes build errors in drivers caused by the OF device_node pointer being moved into struct device Signed-off-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
This commit is contained in:
parent
d4b8b2c2c0
commit
c8a4d0fd2a
@ -232,7 +232,7 @@ static int __devinit fun_probe(struct of_device *ofdev,
|
|||||||
if (!fun)
|
if (!fun)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
ret = of_address_to_resource(ofdev->node, 0, &io_res);
|
ret = of_address_to_resource(ofdev->dev.of_node, 0, &io_res);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(&ofdev->dev, "can't get IO base\n");
|
dev_err(&ofdev->dev, "can't get IO base\n");
|
||||||
goto err1;
|
goto err1;
|
||||||
@ -244,7 +244,8 @@ static int __devinit fun_probe(struct of_device *ofdev,
|
|||||||
goto err1;
|
goto err1;
|
||||||
}
|
}
|
||||||
|
|
||||||
prop = of_get_property(ofdev->node, "fsl,upm-addr-offset", &size);
|
prop = of_get_property(ofdev->dev.of_node, "fsl,upm-addr-offset",
|
||||||
|
&size);
|
||||||
if (!prop || size != sizeof(uint32_t)) {
|
if (!prop || size != sizeof(uint32_t)) {
|
||||||
dev_err(&ofdev->dev, "can't get UPM address offset\n");
|
dev_err(&ofdev->dev, "can't get UPM address offset\n");
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
@ -252,7 +253,7 @@ static int __devinit fun_probe(struct of_device *ofdev,
|
|||||||
}
|
}
|
||||||
fun->upm_addr_offset = *prop;
|
fun->upm_addr_offset = *prop;
|
||||||
|
|
||||||
prop = of_get_property(ofdev->node, "fsl,upm-cmd-offset", &size);
|
prop = of_get_property(ofdev->dev.of_node, "fsl,upm-cmd-offset", &size);
|
||||||
if (!prop || size != sizeof(uint32_t)) {
|
if (!prop || size != sizeof(uint32_t)) {
|
||||||
dev_err(&ofdev->dev, "can't get UPM command offset\n");
|
dev_err(&ofdev->dev, "can't get UPM command offset\n");
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
@ -260,7 +261,7 @@ static int __devinit fun_probe(struct of_device *ofdev,
|
|||||||
}
|
}
|
||||||
fun->upm_cmd_offset = *prop;
|
fun->upm_cmd_offset = *prop;
|
||||||
|
|
||||||
prop = of_get_property(ofdev->node,
|
prop = of_get_property(ofdev->dev.of_node,
|
||||||
"fsl,upm-addr-line-cs-offsets", &size);
|
"fsl,upm-addr-line-cs-offsets", &size);
|
||||||
if (prop && (size / sizeof(uint32_t)) > 0) {
|
if (prop && (size / sizeof(uint32_t)) > 0) {
|
||||||
fun->mchip_count = size / sizeof(uint32_t);
|
fun->mchip_count = size / sizeof(uint32_t);
|
||||||
@ -276,7 +277,7 @@ static int __devinit fun_probe(struct of_device *ofdev,
|
|||||||
|
|
||||||
for (i = 0; i < fun->mchip_count; i++) {
|
for (i = 0; i < fun->mchip_count; i++) {
|
||||||
fun->rnb_gpio[i] = -1;
|
fun->rnb_gpio[i] = -1;
|
||||||
rnb_gpio = of_get_gpio(ofdev->node, i);
|
rnb_gpio = of_get_gpio(ofdev->dev.of_node, i);
|
||||||
if (rnb_gpio >= 0) {
|
if (rnb_gpio >= 0) {
|
||||||
ret = gpio_request(rnb_gpio, dev_name(&ofdev->dev));
|
ret = gpio_request(rnb_gpio, dev_name(&ofdev->dev));
|
||||||
if (ret) {
|
if (ret) {
|
||||||
@ -292,13 +293,13 @@ static int __devinit fun_probe(struct of_device *ofdev,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
prop = of_get_property(ofdev->node, "chip-delay", NULL);
|
prop = of_get_property(ofdev->dev.of_node, "chip-delay", NULL);
|
||||||
if (prop)
|
if (prop)
|
||||||
fun->chip_delay = *prop;
|
fun->chip_delay = *prop;
|
||||||
else
|
else
|
||||||
fun->chip_delay = 50;
|
fun->chip_delay = 50;
|
||||||
|
|
||||||
prop = of_get_property(ofdev->node, "fsl,upm-wait-flags", &size);
|
prop = of_get_property(ofdev->dev.of_node, "fsl,upm-wait-flags", &size);
|
||||||
if (prop && size == sizeof(uint32_t))
|
if (prop && size == sizeof(uint32_t))
|
||||||
fun->wait_flags = *prop;
|
fun->wait_flags = *prop;
|
||||||
else
|
else
|
||||||
@ -315,7 +316,7 @@ static int __devinit fun_probe(struct of_device *ofdev,
|
|||||||
fun->dev = &ofdev->dev;
|
fun->dev = &ofdev->dev;
|
||||||
fun->last_ctrl = NAND_CLE;
|
fun->last_ctrl = NAND_CLE;
|
||||||
|
|
||||||
ret = fun_chip_init(fun, ofdev->node, &io_res);
|
ret = fun_chip_init(fun, ofdev->dev.of_node, &io_res);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err2;
|
goto err2;
|
||||||
|
|
||||||
|
@ -183,7 +183,7 @@ static int __devinit socrates_nand_probe(struct of_device *ofdev,
|
|||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
host->io_base = of_iomap(ofdev->node, 0);
|
host->io_base = of_iomap(ofdev->dev.of_node, 0);
|
||||||
if (host->io_base == NULL) {
|
if (host->io_base == NULL) {
|
||||||
printk(KERN_ERR "socrates_nand: ioremap failed\n");
|
printk(KERN_ERR "socrates_nand: ioremap failed\n");
|
||||||
kfree(host);
|
kfree(host);
|
||||||
@ -244,7 +244,7 @@ static int __devinit socrates_nand_probe(struct of_device *ofdev,
|
|||||||
#ifdef CONFIG_MTD_OF_PARTS
|
#ifdef CONFIG_MTD_OF_PARTS
|
||||||
if (num_partitions == 0) {
|
if (num_partitions == 0) {
|
||||||
num_partitions = of_mtd_parse_partitions(&ofdev->dev,
|
num_partitions = of_mtd_parse_partitions(&ofdev->dev,
|
||||||
ofdev->node,
|
ofdev->dev.of_node,
|
||||||
&partitions);
|
&partitions);
|
||||||
if (num_partitions < 0) {
|
if (num_partitions < 0) {
|
||||||
res = num_partitions;
|
res = num_partitions;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user