Doug, > +static bool sdebug_random = DEF_RANDOM; [...] > +static ssize_t random_show(struct device_driver *ddp, char *buf) > +{ > + return scnprintf(buf, PAGE_SIZE, "%d\n", (int)sdebug_random); > +} Minor nit: I prefer %u for booleans. > +static ssize_t random_store(struct device_driver *ddp, const char *buf, > + size_t count) > +{ > + int n; > + > + if (count > 0 && kstrtoint(buf, 10, &n) == 0 && n >= 0) { > + sdebug_random = (n > 0); > + return count; > + } > + return -EINVAL; > +} kstrtobool()? Also, you don't need to check for count > 0. This function won't be called if count = 0. -- Martin K. Petersen Oracle Linux Engineering