From 5acdc1fa2d9614ecd301f3d27f19bfeabe811ade Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Wed, 12 Nov 2008 23:48:40 -0800 Subject: sparc: struct device - replace bus_id with dev_name(), dev_set_name() Acked-by: Greg Kroah-Hartman Signed-off-by: Kay Sievers Signed-off-by: David S. Miller --- arch/sparc/kernel/of_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch') diff --git a/arch/sparc/kernel/of_device.c b/arch/sparc/kernel/of_device.c index 0837bd52e28f..0a83bd737654 100644 --- a/arch/sparc/kernel/of_device.c +++ b/arch/sparc/kernel/of_device.c @@ -563,9 +563,9 @@ build_resources: op->dev.parent = parent; op->dev.bus = &of_platform_bus_type; if (!parent) - strcpy(op->dev.bus_id, "root"); + dev_set_name(&op->dev, "root"); else - sprintf(op->dev.bus_id, "%08x", dp->node); + dev_set_name(&op->dev, "%08x", dp->node); if (of_device_register(op)) { printk("%s: Could not register of device.\n", -- cgit v1.2.3-55-g7522 From e64ed0225bd82d4c108c9f78f46070cfade14fac Mon Sep 17 00:00:00 2001 From: Robert Reif Date: Wed, 12 Nov 2008 23:51:54 -0800 Subject: sparc: Fix tty compile warnings. This patch fixes tty compile warnings as sugested by Alan Cox: CC drivers/char/n_tty.o drivers/char/n_tty.c: In function ‘normal_poll’: drivers/char/n_tty.c:1555: warning: array subscript is above array bounds drivers/char/n_tty.c:1564: warning: array subscript is above array bounds drivers/char/n_tty.c: In function ‘read_chan’: drivers/char/n_tty.c:1269: warning: array subscript is above array bounds CC drivers/char/tty_ioctl.o drivers/char/tty_ioctl.c: In function ‘set_termios’: drivers/char/tty_ioctl.c:533: warning: array subscript is above array bounds drivers/char/tty_ioctl.c:537: warning: array subscript is above array bounds drivers/char/tty_ioctl.c: In function ‘tty_mode_ioctl’: drivers/char/tty_ioctl.c:662: warning: array subscript is above array bounds drivers/char/tty_ioctl.c:892: warning: array subscript is above array bounds drivers/char/tty_ioctl.c:896: warning: array subscript is above array bounds drivers/char/tty_ioctl.c:577: warning: array subscript is above array bounds drivers/char/tty_ioctl.c:928: warning: array subscript is above array bounds drivers/char/tty_ioctl.c:934: warning: array subscript is above array bounds Signed-off-by: Robert Reif Signed-off-by: David S. Miller --- arch/sparc/include/asm/termbits.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'arch') diff --git a/arch/sparc/include/asm/termbits.h b/arch/sparc/include/asm/termbits.h index d6ca3e2754f5..d72dfed1f9d7 100644 --- a/arch/sparc/include/asm/termbits.h +++ b/arch/sparc/include/asm/termbits.h @@ -29,10 +29,11 @@ struct termios { tcflag_t c_cflag; /* control mode flags */ tcflag_t c_lflag; /* local mode flags */ cc_t c_line; /* line discipline */ +#ifndef __KERNEL__ cc_t c_cc[NCCS]; /* control characters */ -#ifdef __KERNEL__ +#else + cc_t c_cc[NCCS+2]; /* kernel needs 2 more to hold vmin/vtime */ #define SIZEOF_USER_TERMIOS sizeof (struct termios) - (2*sizeof (cc_t)) - cc_t _x_cc[2]; /* We need them to hold vmin/vtime */ #endif }; @@ -42,8 +43,7 @@ struct termios2 { tcflag_t c_cflag; /* control mode flags */ tcflag_t c_lflag; /* local mode flags */ cc_t c_line; /* line discipline */ - cc_t c_cc[NCCS]; /* control characters */ - cc_t _x_cc[2]; /* padding to match ktermios */ + cc_t c_cc[NCCS+2]; /* control characters */ speed_t c_ispeed; /* input speed */ speed_t c_ospeed; /* output speed */ }; @@ -54,8 +54,7 @@ struct ktermios { tcflag_t c_cflag; /* control mode flags */ tcflag_t c_lflag; /* local mode flags */ cc_t c_line; /* line discipline */ - cc_t c_cc[NCCS]; /* control characters */ - cc_t _x_cc[2]; /* We need them to hold vmin/vtime */ + cc_t c_cc[NCCS+2]; /* control characters */ speed_t c_ispeed; /* input speed */ speed_t c_ospeed; /* output speed */ }; -- cgit v1.2.3-55-g7522