git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git]
/
drivers
/
scsi
/
scsi_sysfs.c
diff --git
a/drivers/scsi/scsi_sysfs.c
b/drivers/scsi/scsi_sysfs.c
index
e7fe565
..
a6fde52
100644
(file)
--- a/
drivers/scsi/scsi_sysfs.c
+++ b/
drivers/scsi/scsi_sysfs.c
@@
-6,6
+6,7
@@
* Created to pull SCSI mid layer sysfs routines into one file.
*/
* Created to pull SCSI mid layer sysfs routines into one file.
*/
+#include <linux/config.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/blkdev.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/blkdev.h>
@@
-38,7
+39,7
@@
const char *scsi_device_state_name(enum scsi_device_state state)
int i;
char *name = NULL;
int i;
char *name = NULL;
- for (i = 0; i <
ARRAY_SIZE(sdev_states
); i++) {
+ for (i = 0; i <
sizeof(sdev_states)/sizeof(sdev_states[0]
); i++) {
if (sdev_states[i].value == state) {
name = sdev_states[i].name;
break;
if (sdev_states[i].value == state) {
name = sdev_states[i].name;
break;
@@
-64,7
+65,7
@@
const char *scsi_host_state_name(enum scsi_host_state state)
int i;
char *name = NULL;
int i;
char *name = NULL;
- for (i = 0; i <
ARRAY_SIZE(shost_states
); i++) {
+ for (i = 0; i <
sizeof(shost_states)/sizeof(shost_states[0]
); i++) {
if (shost_states[i].value == state) {
name = shost_states[i].name;
break;
if (shost_states[i].value == state) {
name = shost_states[i].name;
break;
@@
-159,7
+160,7
@@
store_shost_state(struct class_device *class_dev, const char *buf, size_t count)
struct Scsi_Host *shost = class_to_shost(class_dev);
enum scsi_host_state state = 0;
struct Scsi_Host *shost = class_to_shost(class_dev);
enum scsi_host_state state = 0;
- for (i = 0; i <
ARRAY_SIZE(shost_states
); i++) {
+ for (i = 0; i <
sizeof(shost_states)/sizeof(shost_states[0]
); i++) {
const int len = strlen(shost_states[i].name);
if (strncmp(shost_states[i].name, buf, len) == 0 &&
buf[len] == '\n') {
const int len = strlen(shost_states[i].name);
if (strncmp(shost_states[i].name, buf, len) == 0 &&
buf[len] == '\n') {
@@
-465,7
+466,7
@@
store_state_field(struct device *dev, struct device_attribute *attr, const char
struct scsi_device *sdev = to_scsi_device(dev);
enum scsi_device_state state = 0;
struct scsi_device *sdev = to_scsi_device(dev);
enum scsi_device_state state = 0;
- for (i = 0; i <
ARRAY_SIZE(sdev_states
); i++) {
+ for (i = 0; i <
sizeof(sdev_states)/sizeof(sdev_states[0]
); i++) {
const int len = strlen(sdev_states[i].name);
if (strncmp(sdev_states[i].name, buf, len) == 0 &&
buf[len] == '\n') {
const int len = strlen(sdev_states[i].name);
if (strncmp(sdev_states[i].name, buf, len) == 0 &&
buf[len] == '\n') {