diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2021-01-31 19:23:55 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2021-02-23 10:25:29 -0500 |
commit | 6f24784f00f2b5862b367caeecc5cca22a77faa3 (patch) | |
tree | bcbdc0d7f18f5036f360bb61cc0c9447a25f348c /drivers/rtc | |
parent | 9652c73246b980b9f2387916c35e02638d163472 (diff) | |
download | linux-6f24784f00f2b5862b367caeecc5cca22a77faa3.tar.bz2 |
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.c | 4 |
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; } |