diff options
Diffstat (limited to 'drivers/scsi/qla1280.c')
-rw-r--r-- | drivers/scsi/qla1280.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c index 5a48e55f9418..77bb2351500c 100644 --- a/drivers/scsi/qla1280.c +++ b/drivers/scsi/qla1280.c | |||
@@ -4239,15 +4239,12 @@ qla1280_get_token(char *str) | |||
4239 | { | 4239 | { |
4240 | char *sep; | 4240 | char *sep; |
4241 | long ret = -1; | 4241 | long ret = -1; |
4242 | int i, len; | 4242 | int i; |
4243 | |||
4244 | len = sizeof(setup_token)/sizeof(struct setup_tokens); | ||
4245 | 4243 | ||
4246 | sep = strchr(str, ':'); | 4244 | sep = strchr(str, ':'); |
4247 | 4245 | ||
4248 | if (sep) { | 4246 | if (sep) { |
4249 | for (i = 0; i < len; i++){ | 4247 | for (i = 0; i < ARRAY_SIZE(setup_token); i++) { |
4250 | |||
4251 | if (!strncmp(setup_token[i].token, str, (sep - str))) { | 4248 | if (!strncmp(setup_token[i].token, str, (sep - str))) { |
4252 | ret = setup_token[i].val; | 4249 | ret = setup_token[i].val; |
4253 | break; | 4250 | break; |