[linux-pm] [PATCH] PowerOP, PowerOP Sysfs 2/3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 24, 2006 at 05:12:02AM +0400, Eugeny S. Mints wrote:
> Reference SysFS code for PowerOP

> diff --git a/drivers/powerop/Kconfig b/drivers/powerop/Kconfig
> index 94d2459..fe5c946 100644
> --- a/drivers/powerop/Kconfig
> +++ b/drivers/powerop/Kconfig
> @@ -8,5 +8,10 @@ config POWEROP
>  	bool "PowerOP Core"
>  	help
>  
> +config POWEROP_SYSFS
> +	bool "  Enable PowerOP sysfs interface"
> +	depends on POWEROP && SYSFS
> +	help

Why would you not want this?  Why not always force it enabled?

> +static ssize_t active_store(struct subsystem * subsys, const char * buf,
> +			    size_t n)
> +{
> +	int error;
> +	
> +	error = powerop_set_point(buf);
> +	if (error != 0)
> +		return error;
> +
> +	strcpy(active_name, buf);
> +	return n;
> +}

This seems to be an abuse of the "one value per file" rule of sysfs,
right?

> +	if ((error = subsystem_register(&powerop_subsys))) {

So now there is both a /sys/power and /sys/powerop?  That will be
confusing for everyone, why not just use the /sys/power place?

thanks,

greg k-h


[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux