Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 295bdd9c authored by Grant Likely's avatar Grant Likely
Browse files

of/rtc: rtc-mpc5121.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: default avatarGrant Likely <grant.likely@secretlab.ca>
CC: Paul Gortmaker <p_gortmaker@yahoo.com>
CC: Alessandro Zummo <a.zummo@towertech.it>
CC: Wolfgang Denk <wd@denx.de>
CC: Tejun Heo <tj@kernel.org>
CC: Anatolij Gustschin <agust@denx.de>
CC: rtc-linux@googlegroups.com
CC: devicetree-discuss@lists.ozlabs.org
parent b4a75c91
Loading
Loading
Loading
Loading
+8 −6
Original line number Original line Diff line number Diff line
@@ -279,7 +279,7 @@ static int __devinit mpc5121_rtc_probe(struct of_device *op,
	if (!rtc)
	if (!rtc)
		return -ENOMEM;
		return -ENOMEM;


	rtc->regs = of_iomap(op->node, 0);
	rtc->regs = of_iomap(op->dev.of_node, 0);
	if (!rtc->regs) {
	if (!rtc->regs) {
		dev_err(&op->dev, "%s: couldn't map io space\n", __func__);
		dev_err(&op->dev, "%s: couldn't map io space\n", __func__);
		err = -ENOSYS;
		err = -ENOSYS;
@@ -290,7 +290,7 @@ static int __devinit mpc5121_rtc_probe(struct of_device *op,


	dev_set_drvdata(&op->dev, rtc);
	dev_set_drvdata(&op->dev, rtc);


	rtc->irq = irq_of_parse_and_map(op->node, 1);
	rtc->irq = irq_of_parse_and_map(op->dev.of_node, 1);
	err = request_irq(rtc->irq, mpc5121_rtc_handler, IRQF_DISABLED,
	err = request_irq(rtc->irq, mpc5121_rtc_handler, IRQF_DISABLED,
						"mpc5121-rtc", &op->dev);
						"mpc5121-rtc", &op->dev);
	if (err) {
	if (err) {
@@ -299,7 +299,7 @@ static int __devinit mpc5121_rtc_probe(struct of_device *op,
		goto out_dispose;
		goto out_dispose;
	}
	}


	rtc->irq_periodic = irq_of_parse_and_map(op->node, 0);
	rtc->irq_periodic = irq_of_parse_and_map(op->dev.of_node, 0);
	err = request_irq(rtc->irq_periodic, mpc5121_rtc_handler_upd,
	err = request_irq(rtc->irq_periodic, mpc5121_rtc_handler_upd,
				IRQF_DISABLED, "mpc5121-rtc_upd", &op->dev);
				IRQF_DISABLED, "mpc5121-rtc_upd", &op->dev);
	if (err) {
	if (err) {
@@ -365,9 +365,11 @@ static struct of_device_id mpc5121_rtc_match[] __devinitdata = {
};
};


static struct of_platform_driver mpc5121_rtc_driver = {
static struct of_platform_driver mpc5121_rtc_driver = {
	.owner = THIS_MODULE,
	.driver = {
		.name = "mpc5121-rtc",
		.name = "mpc5121-rtc",
	.match_table = mpc5121_rtc_match,
		.owner = THIS_MODULE,
		.of_match_table = mpc5121_rtc_match,
	},
	.probe = mpc5121_rtc_probe,
	.probe = mpc5121_rtc_probe,
	.remove = __devexit_p(mpc5121_rtc_remove),
	.remove = __devexit_p(mpc5121_rtc_remove),
};
};