projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into 85xx
[powerpc.git]
/
arch
/
i386
/
kernel
/
msr.c
diff --git
a/arch/i386/kernel/msr.c
b/arch/i386/kernel/msr.c
index
a773f77
..
4e14264
100644
(file)
--- a/
arch/i386/kernel/msr.c
+++ b/
arch/i386/kernel/msr.c
@@
-172,7
+172,7
@@
static ssize_t msr_read(struct file *file, char __user * buf,
u32 __user *tmp = (u32 __user *) buf;
u32 data[2];
u32 reg = *ppos;
u32 __user *tmp = (u32 __user *) buf;
u32 data[2];
u32 reg = *ppos;
- int cpu = iminor(file->f_dentry->d_inode);
+ int cpu = iminor(file->f_
path.
dentry->d_inode);
int err;
if (count % 8)
int err;
if (count % 8)
@@
-195,15
+195,14
@@
static ssize_t msr_write(struct file *file, const char __user *buf,
{
const u32 __user *tmp = (const u32 __user *)buf;
u32 data[2];
{
const u32 __user *tmp = (const u32 __user *)buf;
u32 data[2];
- size_t rv;
u32 reg = *ppos;
u32 reg = *ppos;
- int cpu = iminor(file->f_dentry->d_inode);
+ int cpu = iminor(file->f_
path.
dentry->d_inode);
int err;
if (count % 8)
return -EINVAL; /* Invalid chunk size */
int err;
if (count % 8)
return -EINVAL; /* Invalid chunk size */
- for (
rv = 0
; count; count -= 8) {
+ for (; count; count -= 8) {
if (copy_from_user(&data, tmp, 8))
return -EFAULT;
err = do_wrmsr(cpu, reg, data[0], data[1]);
if (copy_from_user(&data, tmp, 8))
return -EFAULT;
err = do_wrmsr(cpu, reg, data[0], data[1]);
@@
-217,7
+216,7
@@
static ssize_t msr_write(struct file *file, const char __user *buf,
static int msr_open(struct inode *inode, struct file *file)
{
static int msr_open(struct inode *inode, struct file *file)
{
- unsigned int cpu = iminor(file->f_dentry->d_inode);
+ unsigned int cpu = iminor(file->f_
path.
dentry->d_inode);
struct cpuinfo_x86 *c = &(cpu_data)[cpu];
if (cpu >= NR_CPUS || !cpu_online(cpu))
struct cpuinfo_x86 *c = &(cpu_data)[cpu];
if (cpu >= NR_CPUS || !cpu_online(cpu))
@@
-231,7
+230,7
@@
static int msr_open(struct inode *inode, struct file *file)
/*
* File operations we support
*/
/*
* File operations we support
*/
-static struct file_operations msr_fops = {
+static
const
struct file_operations msr_fops = {
.owner = THIS_MODULE,
.llseek = msr_seek,
.read = msr_read,
.owner = THIS_MODULE,
.llseek = msr_seek,
.read = msr_read,
@@
-250,7
+249,6
@@
static int msr_device_create(int i)
return err;
}
return err;
}
-#ifdef CONFIG_HOTPLUG_CPU
static int msr_class_cpu_callback(struct notifier_block *nfb,
unsigned long action, void *hcpu)
{
static int msr_class_cpu_callback(struct notifier_block *nfb,
unsigned long action, void *hcpu)
{
@@
-271,7
+269,6
@@
static struct notifier_block __cpuinitdata msr_class_cpu_notifier =
{
.notifier_call = msr_class_cpu_callback,
};
{
.notifier_call = msr_class_cpu_callback,
};
-#endif
static int __init msr_init(void)
{
static int __init msr_init(void)
{