diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2021-02-01 01:23:55 +0100 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2021-02-23 16:25:29 +0100 |
commit | 6f24784f00f2b5862b367caeecc5cca22a77faa3 (patch) | |
tree | bcbdc0d7f18f5036f360bb61cc0c9447a25f348c /arch | |
parent | 9p: fix misuse of sscanf() in v9fs_stat2inode() (diff) | |
download | linux-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 'arch')
-rw-r--r-- | arch/sh/boards/mach-landisk/gio.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/sh/boards/mach-landisk/gio.c b/arch/sh/boards/mach-landisk/gio.c index 1c0da99dfc60..ff2200fec29a 100644 --- a/arch/sh/boards/mach-landisk/gio.c +++ b/arch/sh/boards/mach-landisk/gio.c @@ -27,11 +27,10 @@ static int openCnt; static int gio_open(struct inode *inode, struct file *filp) { - int minor; + int minor = iminor(inode); int ret = -ENOENT; preempt_disable(); - minor = MINOR(inode->i_rdev); if (minor < DEVCOUNT) { if (openCnt > 0) { ret = -EALREADY; @@ -46,9 +45,8 @@ static int gio_open(struct inode *inode, struct file *filp) static int gio_close(struct inode *inode, struct file *filp) { - int minor; + int minor = iminor(inode); - minor = MINOR(inode->i_rdev); if (minor < DEVCOUNT) { openCnt--; } |