forked from Minki/linux
[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: Christoph Hellwig <hch@lst.de> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
16cf0d8165
commit
1928f8e541
@ -474,16 +474,6 @@ COMPATIBLE_IOCTL(FBIOGCURMAX)
|
||||
/* Little v, the video4linux ioctls */
|
||||
COMPATIBLE_IOCTL(_IOR('p', 20, int[7])) /* RTCGET */
|
||||
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(D7SIOCWR)
|
||||
COMPATIBLE_IOCTL(D7SIOCTM)
|
||||
|
@ -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().
|
||||
* Return: Gives 0 for implemented commands, -EINVAL otherwise.
|
||||
*/
|
||||
static int
|
||||
envctrl_ioctl(struct inode *inode, struct file *file,
|
||||
unsigned int cmd, unsigned long arg)
|
||||
static long
|
||||
envctrl_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
char __user *infobuf;
|
||||
|
||||
@ -717,7 +716,10 @@ envctrl_release(struct inode *inode, struct file *file)
|
||||
static struct file_operations envctrl_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.read = envctrl_read,
|
||||
.ioctl = envctrl_ioctl,
|
||||
.unlocked_ioctl = envctrl_ioctl,
|
||||
#ifdef CONFIG_COMPAT
|
||||
.compat_ioctl = envctrl_ioctl,
|
||||
#endif
|
||||
.open = envctrl_open,
|
||||
.release = envctrl_release,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user