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

Commit d1d65b77 authored by Alessandro Zummo's avatar Alessandro Zummo Committed by Linus Torvalds
Browse files

[PATCH] RTC subsystem: compact error messages



Move registration error message from drivers to core.

Signed-off-by: default avatarAlessandro Zummo <a.zummo@towertech.it>
Cc: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 82896072
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -96,6 +96,8 @@ struct rtc_device *rtc_device_register(const char *name, struct device *dev,
	idr_remove(&rtc_idr, id);

exit:
	dev_err(dev, "rtc core: unable to register %s, err = %d\n",
			name, err);
	return ERR_PTR(err);
}
EXPORT_SYMBOL_GPL(rtc_device_register);
+0 −2
Original line number Diff line number Diff line
@@ -229,8 +229,6 @@ static int ds1672_probe(struct i2c_adapter *adapter, int address, int kind)

	if (IS_ERR(rtc)) {
		err = PTR_ERR(rtc);
		dev_err(&client->dev,
			"unable to register the class device\n");
		goto exit_detach;
	}

+0 −1
Original line number Diff line number Diff line
@@ -109,7 +109,6 @@ static int __devinit ep93xx_rtc_probe(struct platform_device *dev)
				&dev->dev, &ep93xx_rtc_ops, THIS_MODULE);

	if (IS_ERR(rtc)) {
		dev_err(&dev->dev, "unable to register\n");
		return PTR_ERR(rtc);
	}

+1 −3
Original line number Diff line number Diff line
@@ -151,10 +151,8 @@ static int __devinit m48t86_rtc_probe(struct platform_device *dev)
	struct rtc_device *rtc = rtc_device_register("m48t86",
				&dev->dev, &m48t86_rtc_ops, THIS_MODULE);

	if (IS_ERR(rtc)) {
		dev_err(&dev->dev, "unable to register\n");
	if (IS_ERR(rtc))
		return PTR_ERR(rtc);
	}

	platform_set_drvdata(dev, rtc);

+0 −2
Original line number Diff line number Diff line
@@ -290,8 +290,6 @@ static int pcf8563_probe(struct i2c_adapter *adapter, int address, int kind)

	if (IS_ERR(rtc)) {
		err = PTR_ERR(rtc);
		dev_err(&client->dev,
			"unable to register the class device\n");
		goto exit_detach;
	}

Loading