aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-06-24ocfs2: remove OCFS2_IOCB_SEM lock type in direct ioWeiWei Wang3-37/+4
In ocfs2 direct read/write, OCFS2_IOCB_SEM lock type is used to protect inode->i_alloc_sem rw semaphore lock in the earlier kernel version. However, in the latest kernel, inode->i_alloc_sem rw semaphore lock is not used at all, so OCFS2_IOCB_SEM lock type needs to be removed. Signed-off-by: Weiwei Wang <[email protected]> Cc: Mark Fasheh <[email protected]> Cc: Joel Becker <[email protected]> Reviewed-by: Junxiao Bi <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2015-06-24ocfs2: do not BUG if jbd2_journal_dirty_metadata failsJoseph Qi1-1/+14
jbd2_journal_dirty_metadata may fail. Currently it cannot take care of non zero return value and just BUG in ocfs2_journal_dirty. This patch is aborting the handle and journal instead of BUG. Signed-off-by: Joseph Qi <[email protected]> Cc: joyce.xue <[email protected]> Cc: Mark Fasheh <[email protected]> Cc: Joel Becker <[email protected]> Cc: Junxiao Bi <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2015-06-24ocfs2: remove BUG_ON(!empty_extent) in __ocfs2_rotate_tree_left()Xue jiufei1-1/+2
ocfs2_rotate_tree_left() calls __ocfs2_rotate_tree_left() for left rotation while non-rightmost path containing an empty extent in the leaf block. __ocfs2_rotate_tree_left() returns -EAGAIN if right subtree having an empty extent and pass the empty_extent_path to caller. The caller ocfs2_rotate_tree_left() will restart rotation from the returned path. It will trigger the BUG_ON(!ocfs2_is_empty_extent) when the et on disk is as follows: eb0 is the leaf block of path(say path_a) passed to ocfs2_rotate_tree_left, which has an empty rec[0]. eb1 is the leaf block of path(say path_b) that just right to path_a, which has no empty record. eb2 is the leaf block of path(say path_c) that just right to path_b, which has an empty rec[0]. And path_c is also the rightmost path. Now we want to remove the empty rec[0] in eb0: ocfs2_rotate_tree_left: -> call __ocfs2_rotate_tree_left with path_a as its input *path* -> call ocfs2_rotate_subtree_left with path_a as its input *left_path* and path_b as its input *right_path*. it will move rec[0] in eb1 to eb0, and rec[0] in eb0 is not empty now. -> continue to call ocfs2_rotate_subtree_left with path_b as its input *left_path* and path_c as its input *right_path*, and return -EAGAIN because eb2 has an empty rec[0] -> call __ocfs2_rotate_tree_left with path_c as it input, rotate all records in eb2 to left and return 0. -> call __ocfs2_rotate_tree_left with path_a as its input, and triggers the BUG_ON(!ocfs2_is_empty_extent) as the rec[0] in eb0 is not empty. So the BUG_ON() should be removed and return 0 if rec[0] is no longer an empty extent. Signed-off-by: joyce.xue <[email protected]> Cc: Mark Fasheh <[email protected]> Cc: Joel Becker <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2015-06-24ocfs2: return error when ocfs2_figure_merge_contig_type() failsXue jiufei1-10/+24
ocfs2_figure_merge_contig_type() still returns CONTIG_NONE when some error occurs which will cause an unpredictable error. So return a proper errno when ocfs2_figure_merge_contig_type() fails. Signed-off-by: joyce.xue <[email protected]> Cc: Mark Fasheh <[email protected]> Cc: Joel Becker <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2015-06-24ocfs2/dlm: cleanup unused function __dlm_wait_on_lockres_flags_setJoseph Qi1-1/+0
__dlm_wait_on_lockres_flags_set() is declared but not implemented and used. So remove it. Signed-off-by: Joseph Qi <[email protected]> Cc: Mark Fasheh <[email protected]> Cc: Joel Becker <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2015-06-24ocfs2: use retval instead of status for checking errorDaeseok Youn1-10/+10
The use of 'status' in __ocfs2_add_entry() can return wrong value. Some functions' return value in __ocfs2_add_entry(), i.e ocfs2_journal_access_di() is saved to 'status'. But 'status' is not used in 'bail' label for returning result of __ocfs2_add_entry(). So use retval instead of status. Signed-off-by: Daeseok Youn <[email protected]> Reviewed-by: Joseph Qi <[email protected]> Cc: Joel Becker <[email protected]> Cc: Mark Fasheh <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2015-06-24ocfs2: fix a tiny race when truncate dio orohaned entryJoseph Qi4-46/+39
Once dio crashed it will leave an entry in orphan dir. And orphan scan will take care of the clean up. There is a tiny race case that the same entry will be truncated twice and then trigger the BUG in ocfs2_del_inode_from_orphan. Signed-off-by: Joseph Qi <[email protected]> Cc: Mark Fasheh <[email protected]> Cc: Joel Becker <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2015-06-24ocfs2: remove __mlog_cpu_guessAndrew Morton1-16/+3
raw_smp_processor_id() is the means of avoiding the runtime preemptibility check. [[email protected]: fix printk warning] Cc: Joe Perches <[email protected]> Cc: Joel Becker <[email protected]> Cc: Mark Fasheh <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2015-06-24ocfs2: reduce object size of mlog usesJoe Perches2-30/+59
Using a function for __mlog_printk instead of a macro reduces the object size of built-in.o by about 190KB, or ~18% overall (x86-64 defconfig with all ocfs2 options) $ size fs/ocfs2/built-in.o* text data bss dec hex filename 870954 118471 134408 1123833 1125f9 fs/ocfs2/built-in.o,new 1064081 118071 134408 1316560 1416d0 fs/ocfs2/built-in.o.old Miscellanea: - Move the used-once __mlog_cpu_guess statement expression macro to the masklog.c file above the use in __mlog_printk function - Simplify the mlog macro moving the and/or logic and level code into __mlog_printk [[email protected]: export __mlog_printk() to other ocfs2 modules] Signed-off-by: Joe Perches <[email protected]> Cc: Joel Becker <[email protected]> Cc: Mark Fasheh <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2015-06-24configfs: unexport/make static config_item_init()Fabian Frederick2-3/+1
config_item_init() is only used in item.c Signed-off-by: Fabian Frederick <[email protected]> Cc: Joel Becker <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2015-06-24NTFS: use kvfree() in ntfs_free()Pekka Enberg1-6/+1
Use kvfree() instead of open-coding it. Signed-off-by: Pekka Enberg <[email protected]> Cc: Anton Altaparmakov <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2015-06-24fsnotify: remove obsolete documentationNikolay Borisov1-2/+0
should_send_event is no longer part of struct fsnotify_ops, so remove it. Signed-off-by: Nikolay Borisov <[email protected]> Reviewed-by: Jan Kara <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2015-06-24powerpc: use for_each_sg()Akinobu Mita1-5/+5
This replaces the plain loop over the sglist array with for_each_sg() macro which consists of sg_next() function calls. Since powerpc does select ARCH_HAS_SG_CHAIN, it is necessary to use for_each_sg() in order to loop over each sg element. This also help find problems with drivers that do not properly initialize their sg tables when CONFIG_DEBUG_SG is enabled. Signed-off-by: Akinobu Mita <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Michael Ellerman <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2015-06-24metag: use for_each_sg()Akinobu Mita1-5/+9
This replaces the plain loop over the sglist array with for_each_sg() macro which consists of sg_next() function calls. Since metag doesn't select ARCH_HAS_SG_CHAIN, it is not necessary to use for_each_sg() in order to loop over each sg element. But this can help find problems with drivers that do not properly initialize their sg tables when CONFIG_DEBUG_SG is enabled. Signed-off-by: Akinobu Mita <[email protected]> Cc: James Hogan <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2015-06-24ARM: hisi: revert changes from hisi/hip04-dt branchArnd Bergmann2-160/+0
This backs out all changes that were added in the hip04-dt branch after various boot problems were discovered in UEFI booting. Reported-by: Tyler Baker <[email protected]> Cc: Wei Xu <[email protected]> [khilman: minor changelog updates] Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2015-06-24Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-nextLinus Torvalds1418-27517/+109464
Pull networking updates from David Miller: 1) Add TX fast path in mac80211, from Johannes Berg. 2) Add TSO/GRO support to ibmveth, from Thomas Falcon 3) Move away from cached routes in ipv6, just like ipv4, from Martin KaFai Lau. 4) Lots of new rhashtable tests, from Thomas Graf. 5) Run ingress qdisc lockless, from Alexei Starovoitov. 6) Allow servers to fetch TCP packet headers for SYN packets of new connections, for fingerprinting. From Eric Dumazet. 7) Add mode parameter to pktgen, for testing receive. From Alexei Starovoitov. 8) Cache access optimizations via simplifications of build_skb(), from Alexander Duyck. 9) Move page frag allocator under mm/, also from Alexander. 10) Add xmit_more support to hv_netvsc, from KY Srinivasan. 11) Add a counter guard in case we try to perform endless reclassify loops in the packet scheduler. 12) Extern flow dissector to be programmable and use it in new "Flower" classifier. From Jiri Pirko. 13) AF_PACKET fanout rollover fixes, performance improvements, and new statistics. From Willem de Bruijn. 14) Add netdev driver for GENEVE tunnels, from John W Linville. 15) Add ingress netfilter hooks and filtering, from Pablo Neira Ayuso. 16) Fix handling of epoll edge triggers in TCP, from Eric Dumazet. 17) Add an ECN retry fallback for the initial TCP handshake, from Daniel Borkmann. 18) Add tail call support to BPF, from Alexei Starovoitov. 19) Add several pktgen helper scripts, from Jesper Dangaard Brouer. 20) Add zerocopy support to AF_UNIX, from Hannes Frederic Sowa. 21) Favor even port numbers for allocation to connect() requests, and odd port numbers for bind(0), in an effort to help avoid ip_local_port_range exhaustion. From Eric Dumazet. 22) Add Cavium ThunderX driver, from Sunil Goutham. 23) Allow bpf programs to access skb_iif and dev->ifindex SKB metadata, from Alexei Starovoitov. 24) Add support for T6 chips in cxgb4vf driver, from Hariprasad Shenai. 25) Double TCP Small Queues default to 256K to accomodate situations like the XEN driver and wireless aggregation. From Wei Liu. 26) Add more entropy inputs to flow dissector, from Tom Herbert. 27) Add CDG congestion control algorithm to TCP, from Kenneth Klette Jonassen. 28) Convert ipset over to RCU locking, from Jozsef Kadlecsik. 29) Track and act upon link status of ipv4 route nexthops, from Andy Gospodarek. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1670 commits) bridge: vlan: flush the dynamically learned entries on port vlan delete bridge: multicast: add a comment to br_port_state_selection about blocking state net: inet_diag: export IPV6_V6ONLY sockopt stmmac: troubleshoot unexpected bits in des0 & des1 net: ipv4 sysctl option to ignore routes when nexthop link is down net: track link-status of ipv4 nexthops net: switchdev: ignore unsupported bridge flags net: Cavium: Fix MAC address setting in shutdown state drivers: net: xgene: fix for ACPI support without ACPI ip: report the original address of ICMP messages net/mlx5e: Prefetch skb data on RX net/mlx5e: Pop cq outside mlx5e_get_cqe net/mlx5e: Remove mlx5e_cq.sqrq back-pointer net/mlx5e: Remove extra spaces net/mlx5e: Avoid TX CQE generation if more xmit packets expected net/mlx5e: Avoid redundant dev_kfree_skb() upon NOP completion net/mlx5e: Remove re-assignment of wq type in mlx5e_enable_rq() net/mlx5e: Use skb_shinfo(skb)->gso_segs rather than counting them net/mlx5e: Static mapping of netdev priv resources to/from netdev TX queues net/mlx4_en: Use HW counters for rx/tx bytes/packets in PF device ...
2015-06-25rtc: remove useless I2C dependenciesAlexandre Belloni1-7/+3
Multiple options depend on I2C but are already under under if I2C. Remove those useless dependencies. Signed-off-by: Alexandre Belloni <[email protected]>
2015-06-25rtc: whitespace fixesAlexandre Belloni2-30/+30
Some entries in the Kconfig are improperly indented with spaces instead of tabs. Also fix whitespaces in Makefile. Signed-off-by: Alexandre Belloni <[email protected]>
2015-06-25rtc: Properly sort MakefileAlexandre Belloni1-17/+17
Properly sort the Makefile by filename Signed-off-by: Alexandre Belloni <[email protected]>
2015-06-25MAINTAINERS: Add RTC subsystem repositoryAlexandre Belloni1-0/+1
The RTC subsystem patches are available through my kernel.org repository. Signed-off-by: Alexandre Belloni <[email protected]>
2015-06-25rtc: pfc8563: fix uninitialized variable warningArnd Bergmann1-1/+1
Gcc is unable to prove that alm_pending is always initialized when it is used, so it prints a harmless warning: drivers/rtc/rtc-pcf8563.c: In function 'pcf8563_probe': drivers/rtc/rtc-pcf8563.c:449:5: warning: 'alm_pending' may be used uninitialized in this function [-Wmaybe-uninitialized] This uses the same conditional expression that is used inside of the pcf8563_get_alarm_mode() function, to help gcc figure it out and shut up that warning, and make the ARM defconfigs build again with no warnings. Signed-off-by: Arnd Bergmann <[email protected]> Fixes: a45d528aab8b ("rtc: pcf8563: clear expired alarm at boot time") Signed-off-by: Alexandre Belloni <[email protected]>
2015-06-25rtc: ds1307: Enable the mcp794xx alarm after programming timeNishanth Menon1-6/+6
Alarm interrupt enable register is at offset 0x7, while the time registers for the alarm follow that. When we program Alarm interrupt enable prior to programming the time, it is possible that previous time value could be close or match at the time of alarm enable resulting in interrupt trigger which is unexpected (and does not match the time we expect it to trigger). To prevent this scenario from occuring, program the ALM0_EN bit only after the alarm time is appropriately programmed. Ofcourse, I2C programming is non-atomic, so there are loopholes where the interrupt wont trigger if the time requested is in the past at the time of programming the ALM0_EN bit. However, we will not have unexpected interrupts while the time is programmed after the interrupt are enabled. Signed-off-by: Nishanth Menon <[email protected]> Reviewed-by: Grygorii Strashko <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]>
2015-06-25rtc: hym8563: make the irq optionalHeiko Stübner2-9/+11
Sometimes the irq line is not connected to any soc-pin. This does not hinder basic timekeeping functionality of the rtc, so probe should not fail in this case. Signed-off-by: Heiko Stuebner <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]>
2015-06-25rtc: gemini: fix cocci warningskbuild test robot1-2/+1
Use resource_size function on resource object instead of explicit computation. No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Signed-off-by: Fengguang Wu <[email protected]> Acked-by: Hans Ulli Kroll <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]>
2015-06-25rtc: mv: correct 24 hour error messageAlexandre Belloni1-4/+4
The driver can't accommodate the 12 hour mode but the error message states that the 24 hour mode is not supported. Also fix the typos (hour vs hours). Signed-off-by: Alexandre Belloni <[email protected]>
2015-06-25rtc: mv: use BIT()Alexandre Belloni1-2/+3
Use bit instead of hand coding the shift and correct the 24 hour vs 24 hours typo. Signed-off-by: Alexandre Belloni <[email protected]>
2015-06-25rtc: efi: use correct EFI 'epoch'Ard Biesheuvel1-25/+14
The rtc-efi driver declares that the EFI 'epoch' is 1/1/1998, but the UEFI spec does not define it at all. It does define a range of [1900, 9999] for the 'Year' member of the EFI_TIME struct, so let's use 1900 as the minimum year and not 1998. Also, move the validation of the year to the convert_from_efi_time() routine where all other EFI_TIME fields are validated as well. This prevents rtc_read_time() failures when the RTC that backs the EFI time services is set to a date before 1998, e.g., when it has lost power. This also optimizes the compute_wday() routine, by replacing the for loop with a simple arithmetic expression, and by reusing the yearday value that we need to compute anyway when populating the rtc_time::tm_yday field. Cc: Alessandro Zummo <[email protected]> Cc: Alexandre Belloni <[email protected]> Cc: [email protected] Signed-off-by: Ard Biesheuvel <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]>
2015-06-25rtc: interface: Remove rtc_set_mmss()Xunlei Pang2-46/+0
Now rtc_set_mmss() has no users, just remove it. We still have rtc_set_time() doing similar things. Signed-off-by: Xunlei Pang <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]>
2015-06-25sparc: time: Replace update_persistent_clock() with CONFIG_RTC_SYSTOHCXunlei Pang3-36/+1
On Sparc systems, update_persistent_clock() uses RTC drivers to do the job, it makes more sense to hand it over to CONFIG_RTC_SYSTOHC. In the long run, all the update_persistent_clock() should migrate to proper class RTC drivers if any and use CONFIG_RTC_SYSTOHC instead. Signed-off-by: Xunlei Pang <[email protected]> Acked-by: David S. Miller <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]>
2015-06-25rtc: NTP: Add CONFIG_RTC_SYSTOHC_DEVICE for NTP synchronizationXunlei Pang2-10/+21
Currently, CONFIG_RTC_SYSTOHC uses CONFIG_RTC_HCTOSYS_DEVICE which is originally used by CONFIG_RTC_HCTOSYS, but this rtc device has some limiations, for example, it must be battery-backed, be able to work with irq off and through system suspension, etc. So add CONFIG_RTC_SYSTOHC_DEVICE used exclusively for CONFIG_RTC_SYSTOHC, it is more lenient compared to CONFIG_RTC_HCTOSYS_DEVICE, and could be assigned any available RTC in the system. Default value is CONFIG_RTC_HCTOSYS_DEVICE which is "rtc0" by default. After this patch, NTP will sync up "rtc0" by default. Cc: Paul Bolle <[email protected]> Signed-off-by: Xunlei Pang <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]>
2015-06-25rtc: sunxi: Replace deprecated rtc_tm_to_time()Xunlei Pang1-17/+15
sunxi_rtc_setalarm() uses deprecated rtc_tm_to_time(), which will overflow in year 2106 on 32-bit machines. This patch solves this by: - Replacing rtc_tm_to_time() with rtc_tm_sub() Also remove the unnecessary initial zeroing of some local variables in sunxi_rtc_setalarm(). Cc: Carlo Caione <[email protected]> Signed-off-by: Xunlei Pang <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]>
2015-06-25rtc: isl1208: Replace deprecated rtc_tm_to_time()Xunlei Pang1-8/+1
isl1208_i2c_set_alarm() uses deprecated rtc_tm_to_time(), which will overflow in year 2106 on 32-bit machines. This patch solves this by: - Replacing rtc_tm_to_time() with rtc_tm_sub() Cc: Herbert Valerio Riedel <[email protected]> Signed-off-by: Xunlei Pang <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]>
2015-06-25rtc: Introduce rtc_tm_sub() helper functionXunlei Pang1-0/+8
There're many sites need comparing the two rtc_time variants for many rtc drivers, especially in the instances of rtc_class_ops::set_alarm(). So add this common helper function to make things easy. Suggested-by: Arnd Bergmann <[email protected]> Signed-off-by: Xunlei Pang <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]>
2015-06-25rtc: pcf8563: Replace deprecated rtc_time_to_tm() and rtc_tm_to_time()Xunlei Pang1-4/+4
pcf8563_rtc_set_alarm() uses deprecated rtc_tm_to_time() and rtc_time_to_tm(), which will overflow in year 2106 on 32-bit machines. This patch solves this by: - Replacing rtc_time_to_tm() with rtc_time64_to_tm() - Replacing rtc_tm_to_time() with rtc_tm_to_time64() Acked-by: Arnd Bergmann <[email protected]> Signed-off-by: Xunlei Pang <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]>
2015-06-25rtc: palmas: Initialise bb_charging flag before using itLaxman Dewangan1-1/+1
Initialise the variable high_bb_charging before using it to avoid configuring wrong value and fix following compilation warning: /* rtc-palmas.c: In function ‘palmas_rtc_probe’: rtc-palmas.c:242:7: warning: ‘high_bb_charging’ may be used uninitialized in this function */ Signed-off-by: Laxman Dewangan <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]>
2015-06-25rtc: simplify use of devm_ioremap_resourceJulia Lawall3-12/+3
Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. Move the call to platform_get_resource adjacent to the call to devm_ioremap_resource to make the connection between them more clear. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression pdev,res,n,e,e1; expression ret != 0; identifier l; @@ - res = platform_get_resource(pdev, IORESOURCE_MEM, n); ... when != res - if (res == NULL) { ... \(goto l;\|return ret;\) } ... when != res + res = platform_get_resource(pdev, IORESOURCE_MEM, n); e = devm_ioremap_resource(e1, res); // </smpl> Signed-off-by: Julia Lawall <[email protected]> [[email protected]: acked rtc-spear] Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]>
2015-06-25rtc: pcf8563 fix: return -EINVAL if we read an invalid time.Jan Kardell1-8/+3
Return -EINVAL if the voltage low bit is set to avoid getting a bogus time at boot. There was a comment stating that util-linux hwclock refuses to set a new time if we return an error code on read, but at least the current version do set the time as expected. Remove the comment and the check for valid time, and let the rtc core check it for us. Signed-off-by: Jan Kardell <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]>
2015-06-25rtc: driver for Cortina GeminiHans Ulli Kroll4-0/+189
Driver for the on chip RTC found on Cortina's SoC Gemini. Signed-off-by: Hans Ulli Kroll <[email protected]> [[email protected]: use devm_request_irq() and remove useless goto] Signed-off-by: Alexandre Belloni <[email protected]>
2015-06-25rtc: stmp3xxx select STMP_DEVICEAlexandre Belloni1-0/+1
rtc-stmp3xxx depends on lib/stmp_device, select it. Signed-off-by: Alexandre Belloni <[email protected]>
2015-06-25rtc: snvs: fix wakealarm by call enable_irq_wake earlierStefan Agner1-9/+21
When entering suspend while an wakeup alarm is set, enable_set_wake should make sure that the RTC interrupt keep being enabled and the .irq_set_wake for the RTC interrupt get called. However, since the driver uses the suspend_noirq callback, the call to enable_irq_wake has been made after disabling the interrupts. While .irq_set_wake has been called properly, the interrupt remained disabled. Use the suspend callback to call enable_irq_wake early enough to ensure the RTC interrupt remains enabled. Fixes: 7654e9d4fd8f ("drivers/rtc/rtc-snvs: fix suspend/resume") Cc: <[email protected]> # 3.19 Signed-off-by: Stefan Agner <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]>
2015-06-25rtc: rtc-v3020: use gpio_request_array()Jingoo Han1-30/+11
Using gpio_request_array()/gpio_free_array() can make the code simpler because it can set the direction and initial value in one shot and the for loop is unnecessary. Also, struct v3020_gpio is removed, because the struct v3020_gpio is replaced with struct gpio. Signed-off-by: Jingoo Han <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]>
2015-06-25rtc: ep93xx: Use readl/writel for ioH Hartley Sweeten1-3/+3
Drivers should not be using the __raw_* io accessors. Signed-off-by: H Hartley Sweeten <[email protected]> Cc: Alessandro Zummo <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]>
2015-06-25rtc: max77802: Report platform modalias to fix module autoloadJavier Martinez Canillas1-0/+1
If the rtc-max77802 driver is built as a module, modalias information is not filled so the module is not autoloaded. Use the MODULE_DEVICE_TABLE() macro to export the platform ID table so the module contains that data. Signed-off-by: Javier Martinez Canillas <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]>
2015-06-25rtc: max77686: Report platform modalias to fix module autoloadJavier Martinez Canillas1-0/+1
If the rtc-max77686 driver is built as a module, modalias information is not filled so the module is not autoloaded. Use the MODULE_DEVICE_TABLE() macro to export the platform ID table so the module contains that data. Signed-off-by: Javier Martinez Canillas <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]>
2015-06-25rtc: ds1672, max6900, max8998: Add MODULE_DEVICE_TABLEAxel Lin3-0/+3
The device table is required to load modules based on modaliases. After adding MODULE_DEVICE_TABLE, below entries will be added to modules.alias: alias i2c:ds1672 rtc_ds1672 alias i2c:max6900 rtc_max6900 alias platform:lp3974-rtc rtc_max8998 alias platform:max8998-rtc rtc_max8998 Signed-off-by: Axel Lin <[email protected]> Cc: Alessandro Zummo <[email protected]> Cc: Dale Farnsworth <[email protected]> Cc: Minkyu Kang <[email protected]> Cc: Joonyoung Shim <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]>
2015-06-25rtc: mt6397: fix build on some 32bits platformsAlexandre Belloni1-2/+3
On some !ARM 32bits platforms, the following compilation error happens because of the division on a 64bits value in mtk_rtc_read_time(): drivers/built-in.o: In function `mtk_rtc_read_time': rtc-mt6397.c:(.text+0x265d13f): undefined reference to `__divdi3' rtc-mt6397.c:(.text+0x265d150): undefined reference to `__moddi3' Use div_s64() as done in rtc_time64_to_tm() to solve that. Reported-by: kbuild test robot <[email protected]> Acked-by: Eddie Huang <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]>
2015-06-25rtc: mc13xxx: fix obfuscated and wrong format stringRasmus Villemoes1-1/+1
According to C99, %2.s means 'print two spaces' (a precision of . without following digits or * means 0). The kernel's printf implementation, however, treats that case as if no precision was given, but relying on that quirk is rather silly. Also, since no - (aka left-justify) flag is given, the field with of 2 would then cause the alarm->enabled case to come out as "o n". Deobfuscate it. Signed-off-by: Rasmus Villemoes <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]>
2015-06-25MAINTAINERS: add Mediatek RTC driverEddie Huang1-0/+7
Add Mediatek RTC driver to maintainer entry. Signed-off-by: Eddie Huang <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]>
2015-06-25rtc: mediatek: Add MT6397 RTC driverTianping Fang3-0/+405
Add Mediatek MT6397 RTC driver Signed-off-by: Tianping Fang <[email protected]> Signed-off-by: Eddie Huang <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]>
2015-06-25mfd: provide RTC resource in MT6397 MFDEddie Huang1-0/+18
Provide MT6397 RTC interrupt, base address, and register in MT6397 MFD. Signed-off-by: Eddie Huang <[email protected]> Acked-by: Lee Jones <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]>