On Thu, Mar 28, 2019 at 02:17:31PM +0100, Christian Gromm wrote:
> +int most_set_cfg_direction(char *mdev, char *mdev_ch, char *buf)
> +{
> +     struct most_channel *c = get_channel(mdev, mdev_ch);
> +
> +     if (!c)
> +             return -ENODEV;
> +     if (!strcmp(buf, "dir_rx\n")) {
> +             c->cfg.direction = MOST_CH_RX;
> +     } else if (!strcmp(buf, "rx\n")) {
> +             c->cfg.direction = MOST_CH_RX;
> +     } else if (!strcmp(buf, "dir_tx\n")) {
> +             c->cfg.direction = MOST_CH_TX;
> +     } else if (!strcmp(buf, "tx\n")) {
> +             c->cfg.direction = MOST_CH_TX;
> +     } else {
> +             pr_info("Invalid direction\n");
> +             return -ENODATA;
> +     }

Please use sysfs_streq().

> +     return 0;
> +}

regards,
dan carpenter
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to