<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/rtc/rtc-rp5c01.c, branch linux-5.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2018-03-02T09:09:58Z</updated>
<entry>
<title>rtc: stop validating rtc_time in .read_time</title>
<updated>2018-03-02T09:09:58Z</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@bootlin.com</email>
</author>
<published>2018-02-19T15:23:56Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=22652ba72453d35c8a637d5c0f06b3dc29ff9eb0'/>
<id>urn:sha1:22652ba72453d35c8a637d5c0f06b3dc29ff9eb0</id>
<content type='text'>
The RTC core is always calling rtc_valid_tm after the read_time callback.
It is not necessary to call it just before returning from the callback.

Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: rp5c01: use generic nvmem</title>
<updated>2018-03-01T09:49:31Z</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@bootlin.com</email>
</author>
<published>2018-02-12T22:47:50Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7335fb9be32409c43d81c806c14220d4fcb0227f'/>
<id>urn:sha1:7335fb9be32409c43d81c806c14220d4fcb0227f</id>
<content type='text'>
Instead of adding a binary sysfs attribute from the driver, use the core to
register an nvmem device.

Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: rp5c01: fix possible race condition</title>
<updated>2018-03-01T09:49:30Z</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@bootlin.com</email>
</author>
<published>2018-02-12T22:47:49Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=bcdd559268039d8340d38fa58668393596e29fdc'/>
<id>urn:sha1:bcdd559268039d8340d38fa58668393596e29fdc</id>
<content type='text'>
The probe function is not allowed to fail after registering the RTC because
the following may happen:

CPU0:                                CPU1:
sys_load_module()
 do_init_module()
  do_one_initcall()
   cmos_do_probe()
    rtc_device_register()
     __register_chrdev()
     cdev-&gt;owner = struct module*
                                     open("/dev/rtc0")
    rtc_device_unregister()
  module_put()
  free_module()
   module_free(mod-&gt;module_core)
   /* struct module *module is now
      freed */
                                      chrdev_open()
                                       spin_lock(cdev_lock)
                                       cdev_get()
                                        try_module_get()
                                         module_is_live()
                                         /* dereferences already
                                            freed struct module* */

Switch to devm_rtc_allocate_device/rtc_register_device to register the rtc
as late as possible.

Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: rp5c01: clean up rp5c01_nvram_read()/rp5c01_nvram_write()</title>
<updated>2015-09-05T11:19:10Z</updated>
<author>
<name>Vladimir Zapolskiy</name>
<email>vz@mleia.com</email>
</author>
<published>2015-07-26T21:48:34Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d1cf4bdee8e574c0d2b7ce9fa8d9cd89c0ac761a'/>
<id>urn:sha1:d1cf4bdee8e574c0d2b7ce9fa8d9cd89c0ac761a</id>
<content type='text'>
The change removes redundant sysfs binary file boundary checks, since
this task is already done on caller side in fs/sysfs/file.c

Signed-off-by: Vladimir Zapolskiy &lt;vz@mleia.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>rtc: drop owner assignment from platform_drivers</title>
<updated>2014-10-20T14:21:31Z</updated>
<author>
<name>Wolfram Sang</name>
<email>wsa@the-dreams.de</email>
</author>
<published>2014-10-20T14:21:31Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=0929ae376ef32591a5f13870a703efc2901bfab9'/>
<id>urn:sha1:0929ae376ef32591a5f13870a703efc2901bfab9</id>
<content type='text'>
A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
</entry>
<entry>
<title>rtc: rtc-rp5c01: remove unnecessary platform_set_drvdata()</title>
<updated>2013-07-03T23:07:52Z</updated>
<author>
<name>Jingoo Han</name>
<email>jg1.han@samsung.com</email>
</author>
<published>2013-07-03T22:06:43Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a81de2076c32f2b02c454cfb16fdba63050c30b7'/>
<id>urn:sha1:a81de2076c32f2b02c454cfb16fdba63050c30b7</id>
<content type='text'>
The driver core clears the driver data to NULL after device_release or
on probe failure, since commit 0998d063100 ("device-core: Ensure drvdata
= NULL when no driver is bound").  Thus, it is not needed to manually
clear the device driver data to NULL.

Signed-off-by: Jingoo Han &lt;jg1.han@samsung.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>rtc: rtc-rp5c01: use devm_*() functions</title>
<updated>2013-04-30T01:28:38Z</updated>
<author>
<name>Jingoo Han</name>
<email>jg1.han@samsung.com</email>
</author>
<published>2013-04-29T23:20:51Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ddb396f12556286dfb19f54f39293d8d3fe89c60'/>
<id>urn:sha1:ddb396f12556286dfb19f54f39293d8d3fe89c60</id>
<content type='text'>
Use devm_*() functions to make cleanup paths simpler.

Signed-off-by: Jingoo Han &lt;jg1.han@samsung.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>rtc: rtc-rp5c01: use module_platform_driver_probe()</title>
<updated>2013-04-30T01:28:24Z</updated>
<author>
<name>Jingoo Han</name>
<email>jg1.han@samsung.com</email>
</author>
<published>2013-04-29T23:18:50Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=9842eaff052e0a5f5937108d72ad5a91c86dca6d'/>
<id>urn:sha1:9842eaff052e0a5f5937108d72ad5a91c86dca6d</id>
<content type='text'>
Use module_platform_driver_probe() macro which makes the code smaller and
simpler.

Signed-off-by: Jingoo Han &lt;jg1.han@samsung.com&gt;
Acked-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>rtc: rp5c01: Initialize drvdata before registering device</title>
<updated>2011-05-07T01:02:05Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2011-05-07T00:31:20Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=130107b270f9a8ef1b50e02140a381c44a6abd68'/>
<id>urn:sha1:130107b270f9a8ef1b50e02140a381c44a6abd68</id>
<content type='text'>
Commit f44f7f96a20 ("RTC: Initialize kernel state from RTC") uncovered
an issue in a number of RTC drivers, where the drivers call
rtc_device_register before initializing the device or platform drvdata.

This frequently results in null pointer dereferences when the
rtc_device_register immediately makes use of the rtc device, calling
rtc_read_alarm.

The solution is to ensure the drvdata is initialized prior to registering
the rtc device.

CC: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
CC: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
CC: Thomas Gleixner &lt;tglx@linutronix.de&gt;
CC: rtc-linux@googlegroups.com
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>RTC: Fix minor compile warning</title>
<updated>2011-02-03T21:02:50Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2011-02-03T01:53:42Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d8ce1481ee8770ef2314eb7984a2228dbf64ad06'/>
<id>urn:sha1:d8ce1481ee8770ef2314eb7984a2228dbf64ad06</id>
<content type='text'>
Two rtc drivers return values from void functions. This patch
fixes that.

CC: Thomas Gleixner &lt;tglx@linutronix.de&gt;
CC: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
CC: Marcelo Roberto Jimenez &lt;mroberto@cpti.cetuc.puc-rio.br&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
</feed>
