Commit 1928f8e5 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by David S. Miller

[SPARC] envctrl: implement ->unlocked_ioctl and ->compat_ioctl

all the ioctls in the driver are 32bit compat clean and don't need BKL,
so we can switch it to ->unlocked_ioctl and ->compat_ioctl trivially.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 16cf0d81
...@@ -474,16 +474,6 @@ COMPATIBLE_IOCTL(FBIOGCURMAX) ...@@ -474,16 +474,6 @@ COMPATIBLE_IOCTL(FBIOGCURMAX)
/* Little v, the video4linux ioctls */ /* Little v, the video4linux ioctls */
COMPATIBLE_IOCTL(_IOR('p', 20, int[7])) /* RTCGET */ COMPATIBLE_IOCTL(_IOR('p', 20, int[7])) /* RTCGET */
COMPATIBLE_IOCTL(_IOW('p', 21, int[7])) /* RTCSET */ COMPATIBLE_IOCTL(_IOW('p', 21, int[7])) /* RTCSET */
COMPATIBLE_IOCTL(ENVCTRL_RD_WARNING_TEMPERATURE)
COMPATIBLE_IOCTL(ENVCTRL_RD_SHUTDOWN_TEMPERATURE)
COMPATIBLE_IOCTL(ENVCTRL_RD_CPU_TEMPERATURE)
COMPATIBLE_IOCTL(ENVCTRL_RD_FAN_STATUS)
COMPATIBLE_IOCTL(ENVCTRL_RD_VOLTAGE_STATUS)
COMPATIBLE_IOCTL(ENVCTRL_RD_SCSI_TEMPERATURE)
COMPATIBLE_IOCTL(ENVCTRL_RD_ETHERNET_TEMPERATURE)
COMPATIBLE_IOCTL(ENVCTRL_RD_MTHRBD_TEMPERATURE)
COMPATIBLE_IOCTL(ENVCTRL_RD_CPU_VOLTAGE)
COMPATIBLE_IOCTL(ENVCTRL_RD_GLOBALADDRESS)
/* COMPATIBLE_IOCTL(D7SIOCRD) same value as ENVCTRL_RD_VOLTAGE_STATUS */ /* COMPATIBLE_IOCTL(D7SIOCRD) same value as ENVCTRL_RD_VOLTAGE_STATUS */
COMPATIBLE_IOCTL(D7SIOCWR) COMPATIBLE_IOCTL(D7SIOCWR)
COMPATIBLE_IOCTL(D7SIOCTM) COMPATIBLE_IOCTL(D7SIOCTM)
......
...@@ -654,9 +654,8 @@ envctrl_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) ...@@ -654,9 +654,8 @@ envctrl_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
/* Function Description: Command what to read. Mapped to user ioctl(). /* Function Description: Command what to read. Mapped to user ioctl().
* Return: Gives 0 for implemented commands, -EINVAL otherwise. * Return: Gives 0 for implemented commands, -EINVAL otherwise.
*/ */
static int static long
envctrl_ioctl(struct inode *inode, struct file *file, envctrl_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
unsigned int cmd, unsigned long arg)
{ {
char __user *infobuf; char __user *infobuf;
...@@ -715,11 +714,14 @@ envctrl_release(struct inode *inode, struct file *file) ...@@ -715,11 +714,14 @@ envctrl_release(struct inode *inode, struct file *file)
} }
static struct file_operations envctrl_fops = { static struct file_operations envctrl_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.read = envctrl_read, .read = envctrl_read,
.ioctl = envctrl_ioctl, .unlocked_ioctl = envctrl_ioctl,
.open = envctrl_open, #ifdef CONFIG_COMPAT
.release = envctrl_release, .compat_ioctl = envctrl_ioctl,
#endif
.open = envctrl_open,
.release = envctrl_release,
}; };
static struct miscdevice envctrl_dev = { static struct miscdevice envctrl_dev = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment