summaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2021-02-01 01:23:55 +0100
committerAl Viro <viro@zeniv.linux.org.uk>2021-02-23 16:25:29 +0100
commit6f24784f00f2b5862b367caeecc5cca22a77faa3 (patch)
treebcbdc0d7f18f5036f360bb61cc0c9447a25f348c /drivers/rtc
parent9p: fix misuse of sscanf() in v9fs_stat2inode() (diff)
downloadlinux-6f24784f00f2b5862b367caeecc5cca22a77faa3.tar.xz
linux-6f24784f00f2b5862b367caeecc5cca22a77faa3.zip
whack-a-mole: don't open-code iminor/imajor
several instances creeped back into the tree... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-m41t80.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-m41t80.c b/drivers/rtc/rtc-m41t80.c
index 160dcf68e64e..1e5873261e7e 100644
--- a/drivers/rtc/rtc-m41t80.c
+++ b/drivers/rtc/rtc-m41t80.c
@@ -783,7 +783,7 @@ static long wdt_unlocked_ioctl(struct file *file, unsigned int cmd,
*/
static int wdt_open(struct inode *inode, struct file *file)
{
- if (MINOR(inode->i_rdev) == WATCHDOG_MINOR) {
+ if (iminor(inode) == WATCHDOG_MINOR) {
mutex_lock(&m41t80_rtc_mutex);
if (test_and_set_bit(0, &wdt_is_open)) {
mutex_unlock(&m41t80_rtc_mutex);
@@ -807,7 +807,7 @@ static int wdt_open(struct inode *inode, struct file *file)
*/
static int wdt_release(struct inode *inode, struct file *file)
{
- if (MINOR(inode->i_rdev) == WATCHDOG_MINOR)
+ if (iminor(inode) == WATCHDOG_MINOR)
clear_bit(0, &wdt_is_open);
return 0;
}