of/spi: mpc512x_psc_spi.c: Fix build failures
Fixes build errors caused by the: - OF device_node pointer being moved into struct device - removal of the match_table field from struct of_platform_driver Signed-off-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
This commit is contained in:
parent
de2b606c24
commit
ef7f2e831c
|
@ -512,29 +512,29 @@ static int __init mpc512x_psc_spi_of_probe(struct of_device *op,
|
||||||
u64 regaddr64, size64;
|
u64 regaddr64, size64;
|
||||||
s16 id = -1;
|
s16 id = -1;
|
||||||
|
|
||||||
regaddr_p = of_get_address(op->node, 0, &size64, NULL);
|
regaddr_p = of_get_address(op->dev.of_node, 0, &size64, NULL);
|
||||||
if (!regaddr_p) {
|
if (!regaddr_p) {
|
||||||
dev_err(&op->dev, "Invalid PSC address\n");
|
dev_err(&op->dev, "Invalid PSC address\n");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
regaddr64 = of_translate_address(op->node, regaddr_p);
|
regaddr64 = of_translate_address(op->dev.of_node, regaddr_p);
|
||||||
|
|
||||||
/* get PSC id (0..11, used by port_config) */
|
/* get PSC id (0..11, used by port_config) */
|
||||||
if (op->dev.platform_data == NULL) {
|
if (op->dev.platform_data == NULL) {
|
||||||
const u32 *psc_nump;
|
const u32 *psc_nump;
|
||||||
|
|
||||||
psc_nump = of_get_property(op->node, "cell-index", NULL);
|
psc_nump = of_get_property(op->dev.of_node, "cell-index", NULL);
|
||||||
if (!psc_nump || *psc_nump > 11) {
|
if (!psc_nump || *psc_nump > 11) {
|
||||||
dev_err(&op->dev, "mpc512x_psc_spi: Device node %s "
|
dev_err(&op->dev, "mpc512x_psc_spi: Device node %s "
|
||||||
"has invalid cell-index property\n",
|
"has invalid cell-index property\n",
|
||||||
op->node->full_name);
|
op->dev.of_node->full_name);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
id = *psc_nump;
|
id = *psc_nump;
|
||||||
}
|
}
|
||||||
|
|
||||||
return mpc512x_psc_spi_do_probe(&op->dev, (u32) regaddr64, (u32) size64,
|
return mpc512x_psc_spi_do_probe(&op->dev, (u32) regaddr64, (u32) size64,
|
||||||
irq_of_parse_and_map(op->node, 0), id);
|
irq_of_parse_and_map(op->dev.of_node, 0), id);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int __exit mpc512x_psc_spi_of_remove(struct of_device *op)
|
static int __exit mpc512x_psc_spi_of_remove(struct of_device *op)
|
||||||
|
@ -550,12 +550,12 @@ static struct of_device_id mpc512x_psc_spi_of_match[] = {
|
||||||
MODULE_DEVICE_TABLE(of, mpc512x_psc_spi_of_match);
|
MODULE_DEVICE_TABLE(of, mpc512x_psc_spi_of_match);
|
||||||
|
|
||||||
static struct of_platform_driver mpc512x_psc_spi_of_driver = {
|
static struct of_platform_driver mpc512x_psc_spi_of_driver = {
|
||||||
.match_table = mpc512x_psc_spi_of_match,
|
|
||||||
.probe = mpc512x_psc_spi_of_probe,
|
.probe = mpc512x_psc_spi_of_probe,
|
||||||
.remove = __exit_p(mpc512x_psc_spi_of_remove),
|
.remove = __exit_p(mpc512x_psc_spi_of_remove),
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "mpc512x-psc-spi",
|
.name = "mpc512x-psc-spi",
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
|
.of_match_table = mpc512x_psc_spi_of_match,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue