Skip to contentSkip to conversation

rtc-rtc-rx8025-use-devm_-functions.patch removed from -mm tree

merged [email protected] 1 participant 1 message Jul 8, 2013 Real time clock (RTC)

lore
Share & tools
lore
#0 lore raw

Subject: [merged] rtc-rtc-rx8025-use-devm_-functions.patch removed from -mm tree
To: [email protected],[email protected]
From: [email protected]
Date: Mon, 08 Jul 2013 12:33:34 -0700

The patch titled
Subject: rtc: rtc-rx8025: use devm_*() functions
has been removed from the -mm tree. Its filename was

     rtc-rtc-rx8025-use-devm_-functions.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Jingoo Han <[email protected]>
Subject: rtc: rtc-rx8025: use devm_*() functions

Use devm_*() functions to make cleanup paths simpler.

---

 drivers/rtc/rtc-rx8025.c |   18 +++++-------------
 1 file changed, 5 insertions(+), 13 deletions(-)
drivers/rtc/rtc-rx8025.c renamed from drivers/rtc/rtc-rx8025.c~rtc-rtc-rx8025-use-devm_-functions +5 -10
diff -puN drivers/rtc/rtc-rx8025.c~rtc-rtc-rx8025-use-devm_-functions drivers/rtc/rtc-rx8025.c
@@ -549,7 +549,7 @@ static int rx8025_probe(struct i2c_clien
 		goto errout;
 	}
 
-	rx8025 = kzalloc(sizeof(*rx8025), GFP_KERNEL);
+	rx8025 = devm_kzalloc(&client->dev, sizeof(*rx8025), GFP_KERNEL);
 	if (!rx8025) {
 		dev_err(&adapter->dev, "failed to alloc memory\n");
 		err = -ENOMEM;
@@ -562,7 +562,7 @@ static int rx8025_probe(struct i2c_clien
 
 	err = rx8025_init_client(client, &need_reset);
 	if (err)
-		goto errout_free;
+		goto errout;
 
 	if (need_reset) {
 		struct rtc_time tm;
@@ -572,12 +572,12 @@ static int rx8025_probe(struct i2c_clien
 		rx8025_set_time(&client->dev, &tm);
 	}
 
-	rx8025->rtc = rtc_device_register(client->name, &client->dev,
+	rx8025->rtc = devm_rtc_device_register(&client->dev, client->name,
 					  &rx8025_rtc_ops, THIS_MODULE);
 	if (IS_ERR(rx8025->rtc)) {
 		err = PTR_ERR(rx8025->rtc);
 		dev_err(&client->dev, "unable to register the class device\n");
-		goto errout_free;
+		goto errout;
 	}
 
 	if (client->irq > 0) {
@@ -586,7 +586,7 @@ static int rx8025_probe(struct i2c_clien
 				  0, "rx8025", client);
 		if (err) {
 			dev_err(&client->dev, "unable to request IRQ\n");
-			goto errout_reg;
+			goto errout;
 		}
 	}
 
@@ -603,12 +603,6 @@ errout_irq:
 	if (client->irq > 0)
 		free_irq(client->irq, client);
 
-errout_reg:
-	rtc_device_unregister(rx8025->rtc);
-
-errout_free:
-	kfree(rx8025);