sn_hwperf: Kill BKL usage
This driver always gave up the BKL in its ioctl function, so just convert it to unlocked_ioctl and remove the BKL here. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
This commit is contained in:
parent
7cc4bcc6f1
commit
1114b68468
1 changed files with 2 additions and 7 deletions
|
@ -30,7 +30,6 @@
|
||||||
#include <linux/miscdevice.h>
|
#include <linux/miscdevice.h>
|
||||||
#include <linux/utsname.h>
|
#include <linux/utsname.h>
|
||||||
#include <linux/cpumask.h>
|
#include <linux/cpumask.h>
|
||||||
#include <linux/smp_lock.h>
|
|
||||||
#include <linux/nodemask.h>
|
#include <linux/nodemask.h>
|
||||||
#include <linux/smp.h>
|
#include <linux/smp.h>
|
||||||
#include <linux/mutex.h>
|
#include <linux/mutex.h>
|
||||||
|
@ -682,8 +681,7 @@ static int sn_hwperf_map_err(int hwperf_err)
|
||||||
/*
|
/*
|
||||||
* ioctl for "sn_hwperf" misc device
|
* ioctl for "sn_hwperf" misc device
|
||||||
*/
|
*/
|
||||||
static int
|
static long sn_hwperf_ioctl(struct file *fp, u32 op, unsigned long arg)
|
||||||
sn_hwperf_ioctl(struct inode *in, struct file *fp, u32 op, unsigned long arg)
|
|
||||||
{
|
{
|
||||||
struct sn_hwperf_ioctl_args a;
|
struct sn_hwperf_ioctl_args a;
|
||||||
struct cpuinfo_ia64 *cdata;
|
struct cpuinfo_ia64 *cdata;
|
||||||
|
@ -699,8 +697,6 @@ sn_hwperf_ioctl(struct inode *in, struct file *fp, u32 op, unsigned long arg)
|
||||||
int i;
|
int i;
|
||||||
int j;
|
int j;
|
||||||
|
|
||||||
unlock_kernel();
|
|
||||||
|
|
||||||
/* only user requests are allowed here */
|
/* only user requests are allowed here */
|
||||||
if ((op & SN_HWPERF_OP_MASK) < 10) {
|
if ((op & SN_HWPERF_OP_MASK) < 10) {
|
||||||
r = -EINVAL;
|
r = -EINVAL;
|
||||||
|
@ -859,12 +855,11 @@ sn_hwperf_ioctl(struct inode *in, struct file *fp, u32 op, unsigned long arg)
|
||||||
error:
|
error:
|
||||||
vfree(p);
|
vfree(p);
|
||||||
|
|
||||||
lock_kernel();
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct file_operations sn_hwperf_fops = {
|
static const struct file_operations sn_hwperf_fops = {
|
||||||
.ioctl = sn_hwperf_ioctl,
|
.unlocked_ioctl = sn_hwperf_ioctl,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct miscdevice sn_hwperf_dev = {
|
static struct miscdevice sn_hwperf_dev = {
|
||||||
|
|
Loading…
Add table
Reference in a new issue