diff options
author | Al Viro | 2021-01-31 19:23:55 -0500 |
---|---|---|
committer | Al Viro | 2021-02-23 10:25:29 -0500 |
commit | 6f24784f00f2b5862b367caeecc5cca22a77faa3 (patch) | |
tree | bcbdc0d7f18f5036f360bb61cc0c9447a25f348c /arch | |
parent | 9652c73246b980b9f2387916c35e02638d163472 (diff) |
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--; } |