The patch titled Subject: drivers/video/backlight/lp855x_bl.c: use PAGE_SIZE for the sysfs read operation has been added to the -mm tree. Its filename is backlight-lp855x-use-page_size-for-the-sysfs-read-operation.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: "Kim, Milo" <Milo.Kim@xxxxxx> Subject: drivers/video/backlight/lp855x_bl.c: use PAGE_SIZE for the sysfs read operation sysfs allocates PAGE_SIZE. It is used by each R/W operation method. Use it instead of another buffer size. Signed-off-by: Milo(Woogyom) Kim <milo.kim@xxxxxx> Acked-by: Jingoo Han <jg1.han@xxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/video/backlight/lp855x_bl.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff -puN drivers/video/backlight/lp855x_bl.c~backlight-lp855x-use-page_size-for-the-sysfs-read-operation drivers/video/backlight/lp855x_bl.c --- a/drivers/video/backlight/lp855x_bl.c~backlight-lp855x-use-page_size-for-the-sysfs-read-operation +++ a/drivers/video/backlight/lp855x_bl.c @@ -35,7 +35,6 @@ #define LP8557_EPROM_START 0x10 #define LP8557_EPROM_END 0x1E -#define BUF_SIZE 20 #define DEFAULT_BL_NAME "lcd-backlight" #define MAX_BRIGHTNESS 255 @@ -304,7 +303,7 @@ static ssize_t lp855x_get_chip_id(struct struct device_attribute *attr, char *buf) { struct lp855x *lp = dev_get_drvdata(dev); - return scnprintf(buf, BUF_SIZE, "%s\n", lp->chipname); + return scnprintf(buf, PAGE_SIZE, "%s\n", lp->chipname); } static ssize_t lp855x_get_bl_ctl_mode(struct device *dev, @@ -319,7 +318,7 @@ static ssize_t lp855x_get_bl_ctl_mode(st else if (mode == REGISTER_BASED) strmode = "register based"; - return scnprintf(buf, BUF_SIZE, "%s\n", strmode); + return scnprintf(buf, PAGE_SIZE, "%s\n", strmode); } static DEVICE_ATTR(chip_id, S_IRUGO, lp855x_get_chip_id, NULL); _ Patches currently in -mm which might be from Milo.Kim@xxxxxx are linux-next.patch backlight-lp855x-use-page_size-for-the-sysfs-read-operation.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html