[PATCH 1/4] drivers: create a pinmux subsystem

Mark Brown broonie at opensource.wolfsonmicro.com
Tue May 10 18:40:45 EDT 2011


On Wed, May 11, 2011 at 12:18:00AM +0200, Linus Walleij wrote:

> This is the idiomatic way of providing sysfs strings (compare e.g.
> *_show() in drivers/regulator/core.c), the char *buf comes
> from the sysfs core in struct device_attribute in <linus/device.h>
> with this prototype:

>  ssize_t (*show)(struct device *dev, struct device_attribute *attr,
>                         char *buf);

> and I have no way of knowing how large that buffer is. Migrating all

It's implicitly PAGE_SIZE.  In pretty much all users the buffer is
constrained to well below that by the inputs (sometimes with some help
from users not using insanely long names for things) and the sysfs
semantics which mean you probably got something badly wrong if you get
anywhere near PAGE_SIZE.



More information about the linux-arm-kernel mailing list