git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lockd: convert nsm_mutex to a spinlock
[safe/jmp/linux-2.6]
/
drivers
/
firmware
/
dcdbas.c
diff --git
a/drivers/firmware/dcdbas.c
b/drivers/firmware/dcdbas.c
index
339f405
..
f235940
100644
(file)
--- a/
drivers/firmware/dcdbas.c
+++ b/
drivers/firmware/dcdbas.c
@@
-8,7
+8,7
@@
*
* See Documentation/dcdbas.txt for more information.
*
*
* See Documentation/dcdbas.txt for more information.
*
- * Copyright (C) 1995-200
5
Dell Inc.
+ * Copyright (C) 1995-200
6
Dell Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License v2.0 as published by
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License v2.0 as published by
@@
-35,12
+35,11
@@
#include <linux/types.h>
#include <linux/mutex.h>
#include <asm/io.h>
#include <linux/types.h>
#include <linux/mutex.h>
#include <asm/io.h>
-#include <asm/semaphore.h>
#include "dcdbas.h"
#define DRIVER_NAME "dcdbas"
#include "dcdbas.h"
#define DRIVER_NAME "dcdbas"
-#define DRIVER_VERSION "5.6.0-2"
+#define DRIVER_VERSION "5.6.0-
3.
2"
#define DRIVER_DESCRIPTION "Dell Systems Management Base Driver"
static struct platform_device *dcdbas_pdev;
#define DRIVER_DESCRIPTION "Dell Systems Management Base Driver"
static struct platform_device *dcdbas_pdev;
@@
-149,8
+148,9
@@
static ssize_t smi_data_buf_size_store(struct device *dev,
return count;
}
return count;
}
-static ssize_t smi_data_read(struct kobject *kobj, char *buf, loff_t pos,
- size_t count)
+static ssize_t smi_data_read(struct kobject *kobj,
+ struct bin_attribute *bin_attr,
+ char *buf, loff_t pos, size_t count)
{
size_t max_read;
ssize_t ret;
{
size_t max_read;
ssize_t ret;
@@
-170,11
+170,15
@@
out:
return ret;
}
return ret;
}
-static ssize_t smi_data_write(struct kobject *kobj, char *buf, loff_t pos,
- size_t count)
+static ssize_t smi_data_write(struct kobject *kobj,
+ struct bin_attribute *bin_attr,
+ char *buf, loff_t pos, size_t count)
{
ssize_t ret;
{
ssize_t ret;
+ if ((pos + count) > MAX_SMI_DATA_BUF_SIZE)
+ return -EINVAL;
+
mutex_lock(&smi_data_lock);
ret = smi_data_buf_realloc(pos + count);
mutex_lock(&smi_data_lock);
ret = smi_data_buf_realloc(pos + count);
@@
-260,7
+264,7
@@
static int smi_request(struct smi_cmd *smi_cmd)
/* SMI requires CPU 0 */
old_mask = current->cpus_allowed;
/* SMI requires CPU 0 */
old_mask = current->cpus_allowed;
- set_cpus_allowed
(current,
cpumask_of_cpu(0));
+ set_cpus_allowed
_ptr(current, &
cpumask_of_cpu(0));
if (smp_processor_id() != 0) {
dev_dbg(&dcdbas_pdev->dev, "%s: failed to get CPU 0\n",
__FUNCTION__);
if (smp_processor_id() != 0) {
dev_dbg(&dcdbas_pdev->dev, "%s: failed to get CPU 0\n",
__FUNCTION__);
@@
-280,7
+284,7
@@
static int smi_request(struct smi_cmd *smi_cmd)
);
out:
);
out:
- set_cpus_allowed
(current,
old_mask);
+ set_cpus_allowed
_ptr(current, &
old_mask);
return ret;
}
return ret;
}
@@
-559,7
+563,7
@@
static int __devinit dcdbas_probe(struct platform_device *dev)
while (--i >= 0)
sysfs_remove_bin_file(&dev->dev.kobj,
dcdbas_bin_attrs[i]);
while (--i >= 0)
sysfs_remove_bin_file(&dev->dev.kobj,
dcdbas_bin_attrs[i]);
- sysfs_
creat
e_group(&dev->dev.kobj, &dcdbas_attr_group);
+ sysfs_
remov
e_group(&dev->dev.kobj, &dcdbas_attr_group);
return error;
}
}
return error;
}
}
@@
-653,4
+657,5
@@
MODULE_DESCRIPTION(DRIVER_DESCRIPTION " (version " DRIVER_VERSION ")");
MODULE_VERSION(DRIVER_VERSION);
MODULE_AUTHOR("Dell Inc.");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRIVER_VERSION);
MODULE_AUTHOR("Dell Inc.");
MODULE_LICENSE("GPL");
-
+/* Any System or BIOS claiming to be by Dell */
+MODULE_ALIAS("dmi:*:[bs]vnD[Ee][Ll][Ll]*:*");