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

Commit 5a280844 authored by Dmitry Osipenko's avatar Dmitry Osipenko Committed by Linus Torvalds
Browse files

drivers/rtc/rtc-tps6586x.c: device wakeup flags correction



Use device_init_wakeup() instead of device_set_wakeup_capable() and move
it before rtc dev registering.  This fixes alarmtimer not registered
when tps6586x rtc is the only wakeup compatible rtc in the system.

Signed-off-by: default avatarDmitry Osipenko <digetx@gmail.com>
Cc: Laxman Dewangan <ldewangan@nvidia.com>
Cc: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent f101a946
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -273,6 +273,8 @@ static int tps6586x_rtc_probe(struct platform_device *pdev)
		return ret;
		return ret;
	}
	}


	device_init_wakeup(&pdev->dev, 1);

	platform_set_drvdata(pdev, rtc);
	platform_set_drvdata(pdev, rtc);
	rtc->rtc = devm_rtc_device_register(&pdev->dev, dev_name(&pdev->dev),
	rtc->rtc = devm_rtc_device_register(&pdev->dev, dev_name(&pdev->dev),
				       &tps6586x_rtc_ops, THIS_MODULE);
				       &tps6586x_rtc_ops, THIS_MODULE);
@@ -292,7 +294,6 @@ static int tps6586x_rtc_probe(struct platform_device *pdev)
		goto fail_rtc_register;
		goto fail_rtc_register;
	}
	}
	disable_irq(rtc->irq);
	disable_irq(rtc->irq);
	device_set_wakeup_capable(&pdev->dev, 1);
	return 0;
	return 0;


fail_rtc_register:
fail_rtc_register: