@@ -1813,12 +1813,12 @@ static ssize_t raid_state_store(struct device *dev,
enum myrb_devstate new_state;
unsigned short status;
- if (!strncmp(buf, "kill", 4) ||
- !strncmp(buf, "offline", 7))
+ if (sysfs_streq(buf, "kill") ||
+ sysfs_streq(buf, "offline"))
new_state = MYRB_DEVICE_DEAD;
- else if (!strncmp(buf, "online", 6))
+ else if (sysfs_streq(buf, "online"))
new_state = MYRB_DEVICE_ONLINE;
- else if (!strncmp(buf, "standby", 7))
+ else if (sysfs_streq(buf, "standby"))
new_state = MYRB_DEVICE_STANDBY;
else
return -EINVAL;