RTC fixes for 4.10:

- Allow jz4740 to build as a module again by using kernel_halt()
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEl0I5XWmUIrwBfFMm2KKDO9oT4sIFAliPmqgACgkQ2KKDO9oT
 4sLIIA/+ORkxQ7JbnNM0kwhsL+MUP46CkE7GrgoEGubS/LghKqZhyf2WNXaqJ48J
 tT+Hzn1NhycBrjlhzJ0GEAcq9aWPDJe/56/ZPWABgH4Gfx64Ea1bfhVRgMzBXoTd
 7KE2IkZNCSvaE6UGnurderl6qsJH80HK1AiYz0ZN0xNR/7rxjB2O4VoYNl3rBqhB
 HQG5p6izvBDbhawmyDJcDi7MI3ylKI/ok8NIdXPBv0+DQ0gtBYmrM7JwS8RnbmWZ
 LFtJQE9+M2P58LiEJOv4Ij9jgMt2LiYkDcX/U29Hraeqp14TSPiYbLRUs29WyBRY
 jOmeM9n8FBxxdA4wqN3MAc32EMoHs642lWeDNVfLXiBuXVFAnuKQBagpDY0FDJyx
 ndaG0F6xCTvkQrAbKOtIM0b4kYX0Cdh4OrPstsef0B4WxUUTKWko7dE673GTSqfS
 3aQaXXLkcKY1TNNDtvmCTqvCE+rITwb1nRfQEyDvUnDsgjF2YXxPrAa78qq8qyBy
 15w3Dc23WOglVdV5zfqskeEGWaXVZpZx9zcPBy2Ezj5/KfhE+UNs5ZzPBIzBrQqx
 Sfuwpq6RJcJUP8Rj16869vK1b7C8oKbAX3QYSu6zUncX43n+TC+Vbz6bWrK+ckrM
 2pb6GReyDg66Ztr7N0FqRI9aawmj1wn0s6V/oPx0ukV+iqyCCOY=
 =dHxL
 -----END PGP SIGNATURE-----

Merge tag 'rtc-4.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux

Pull RTC fix from Alexandre Belloni:
 "A single fix for this cycle. It is worth taking it for 4.10 so that
  distributions will not have CONFIG_RTC_DRV_JZ4740 switching from m to
  y in their config.

  Summary:
   - Allow jz4740 to build as a module again by using kernel_halt()"

* tag 'rtc-4.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux:
  rtc: jz4740: make the driver buildable as a module again
This commit is contained in:
Linus Torvalds 2017-01-30 13:18:12 -08:00
commit 751321b3dd
2 changed files with 14 additions and 3 deletions

View File

@ -1551,12 +1551,15 @@ config RTC_DRV_MPC5121
will be called rtc-mpc5121.
config RTC_DRV_JZ4740
bool "Ingenic JZ4740 SoC"
tristate "Ingenic JZ4740 SoC"
depends on MACH_INGENIC || COMPILE_TEST
help
If you say yes here you get support for the Ingenic JZ47xx SoCs RTC
controllers.
This driver can also be buillt as a module. If so, the module
will be called rtc-jz4740.
config RTC_DRV_LPC24XX
tristate "NXP RTC for LPC178x/18xx/408x/43xx"
depends on ARCH_LPC18XX || COMPILE_TEST

View File

@ -17,6 +17,7 @@
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/reboot.h>
@ -294,7 +295,7 @@ static void jz4740_rtc_power_off(void)
JZ_REG_RTC_RESET_COUNTER, reset_counter_ticks);
jz4740_rtc_poweroff(dev_for_power_off);
machine_halt();
kernel_halt();
}
static const struct of_device_id jz4740_rtc_of_match[] = {
@ -302,6 +303,7 @@ static const struct of_device_id jz4740_rtc_of_match[] = {
{ .compatible = "ingenic,jz4780-rtc", .data = (void *)ID_JZ4780 },
{},
};
MODULE_DEVICE_TABLE(of, jz4740_rtc_of_match);
static int jz4740_rtc_probe(struct platform_device *pdev)
{
@ -429,6 +431,7 @@ static const struct platform_device_id jz4740_rtc_ids[] = {
{ "jz4780-rtc", ID_JZ4780 },
{}
};
MODULE_DEVICE_TABLE(platform, jz4740_rtc_ids);
static struct platform_driver jz4740_rtc_driver = {
.probe = jz4740_rtc_probe,
@ -440,4 +443,9 @@ static struct platform_driver jz4740_rtc_driver = {
.id_table = jz4740_rtc_ids,
};
builtin_platform_driver(jz4740_rtc_driver);
module_platform_driver(jz4740_rtc_driver);
MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>");
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("RTC driver for the JZ4740 SoC\n");
MODULE_ALIAS("platform:jz4740-rtc");