Re: [PATCH] allow gpiolib to be a module

From: Ryan Mallon
Date: Tue Sep 11 2012 - 02:17:34 EST


On 10/09/12 22:16, Jan Beulich wrote:
> Without ARCH_REQUIRE_GPIOLIB there's no reason to force this code, when
> enabled, to always be built into the kernel, which requires only minor
> Makefile and source code adjustments.
>
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
>
> ---

<snip>

> +#ifdef MODULE
> +int __init gpiolib_init(void)

Should be static.

> +{
> + return gpiolib_sysfs_init() ?: gpiolib_debugfs_init();

I thought this was going to call gpiolib_sysfs_init() twice until I
looked at gcc's documentation. Maybe the less obtuse, and far more common:

int err;

err = gpiolib_sysfs_init();
if (err)
return err;

return gpiolib_debugfs_init();

?

> +}
> +module_init(gpiolib_init);

~Ryan


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/