Skip to contentSkip to conversation

drivers-rtc-interfacec-return-ebusy-not-eacces-when-device-is-busy.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] drivers-rtc-interfacec-return-ebusy-not-eacces-when-device-is-busy.patch removed from -mm tree
To: [email protected],[email protected],[email protected]
From: [email protected]
Date: Mon, 08 Jul 2013 12:35:12 -0700

The patch titled
Subject: drivers/rtc/interface.c: return -EBUSY, not -EACCES when device is busy
has been removed from the -mm tree. Its filename was
drivers-rtc-interfacec-return-ebusy-not-eacces-when-device-is-busy.patch

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

------------------------------------------------------
From: Chris Brand <[email protected]>
Subject: drivers/rtc/interface.c: return -EBUSY, not -EACCES when device is busy

If rtc->irq_task is non-NULL and task is NULL, they always rtc_irq_set_freq(), whenever err is set to -EBUSY it will then immediately be set to -EACCES, misleading the caller as to the underlying problem.

---

 drivers/rtc/interface.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/rtc/interface.c renamed from drivers/rtc/interface.c~drivers-rtc-interfacec-return-ebusy-not-eacces-when-device-is-busy +4 -4
diff -puN drivers/rtc/interface.c~drivers-rtc-interfacec-return-ebusy-not-eacces-when-device-is-busy drivers/rtc/interface.c
@@ -698,9 +698,9 @@ retry:
 	spin_lock_irqsave(&rtc->irq_task_lock, flags);
 	if (rtc->irq_task != NULL && task == NULL)
 		err = -EBUSY;
-	if (rtc->irq_task != task)
+	else if (rtc->irq_task != task)
 		err = -EACCES;
-	if (!err) {
+	else {
 		if (rtc_update_hrtimer(rtc, enabled) < 0) {
 			spin_unlock_irqrestore(&rtc->irq_task_lock, flags);
 			cpu_relax();
@@ -734,9 +734,9 @@ retry:
 	spin_lock_irqsave(&rtc->irq_task_lock, flags);
 	if (rtc->irq_task != NULL && task == NULL)
 		err = -EBUSY;
-	if (rtc->irq_task != task)
+	else if (rtc->irq_task != task)
 		err = -EACCES;
-	if (!err) {
+	else {
 		rtc->irq_freq = freq;
 		if (rtc->pie_enabled && rtc_update_hrtimer(rtc, 1) < 0) {
 			spin_unlock_irqrestore(&rtc->irq_task_lock, flags);

_

Patches currently in -mm which might be from [email protected] are

origin.patch