summaryrefslogtreecommitdiff
path: root/arch/xtensa/platforms
AgeCommit message (Collapse)Author
2014-01-14xtensa: ISS: always use fixed tuntap configMax Filippov
The code doesn't handle dynamic TAP interface allocation, so there's no point tracking this case. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
2014-01-14xtensa: ISS: enable iss_net_set_macMax Filippov
This allows changing MAC address of the device. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
2014-01-14xtensa: ISS: drop IP setup, clean up MAC setupMax Filippov
Without proper MAC setup network device doesn't work. IP setup is redundant and may be done with 'ip=...' kernel parameter. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
2014-01-14xtensa: ISS: init network interface name before the probeMax Filippov
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
2014-01-14xtensa: ISS: fix command line parameter nameMax Filippov
Now 'ethX=...' syntax can actually be used in kernel command line to specify network interfaces. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
2014-01-14xtensa: ISS: clean up iss-network driverMax Filippov
No functional changes, remove dead/unused code, clean checkpatch warnings, replace strlen of constant strings with sizeof. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
2013-10-16xtensa: Cocci spatch "noderef"Thomas Meyer
sizeof when applied to a pointer typed expression gives the size of the pointer. Found by coccinelle spatch "misc/noderef.cocci" Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: Chris Zankel <chris@zankel.net>
2013-07-08xtensa: remove the second argument of __bio_kmap_atomic()Zhao Hongjiang
kmap_atomic allows only one argument now, just remove the unused 'kmtype'. Signed-off-by: Zhao Hongjiang <zhaohongjiang@huawei.com> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Chris Zankel <chris@zankel.net>
2013-07-08xtensa: cleanup ccount frequency trackingBaruch Siach
Remove unused nsec_per_ccount, and rename ccount_per_jiffy to ccount_preq. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Chris Zankel <chris@zankel.net>
2013-06-05xtensa: ISS: fix section mismatch in iss_net_setupMax Filippov
iss_net_setup is only called from __setup, so it should be marked __init. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
2013-06-05xtensa: xtfpga: fix section mismatchBaruch Siach
platform_calibrate_ccount() calls update_clock_frequency() which is in .init section. However, platform_calibrate_ccount() itself is only called from .init (i.e., time_init()). Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
2013-05-09Merge tag 'xtensa-next-20130508' of git://github.com/czankel/xtensa-linuxLinus Torvalds
Pull xtensa updates from Chris Zankel: "Support for the latest MMU architecture that allows for a larger accessible memory region, and various bug-fixes" * tag 'xtensa-next-20130508' of git://github.com/czankel/xtensa-linux: xtensa: Switch to asm-generic/linkage.h xtensa: fix redboot load address xtensa: ISS: fix timer_lock usage in rs_open xtensa: disable IRQs while IRQ handler is running xtensa: enable lockdep support xtensa: fix arch_irqs_disabled_flags implementation xtensa: add irq flags trace support xtensa: provide custom CALLER_ADDR* implementations xtensa: add stacktrace support xtensa: clean up stpill_registers xtensa: don't use a7 in simcalls xtensa: don't attempt to use unconfigured timers xtensa: provide default platform_pcibios_init implementation xtensa: remove KCORE_ELF again xtensa: document MMUv3 setup sequence xtensa: add MMU v3 support xtensa: fix ibreakenable register update xtensa: fix oprofile building as module
2013-05-09xtensa simdisk: Fix proc_create_data() conversion falloutGeert Uytterhoeven
arch/xtensa/platforms/iss/simdisk.c: In function 'proc_read_simdisk': arch/xtensa/platforms/iss/simdisk.c:220:12: warning: initialization discards 'const' qualifier from pointer target type [enabled by default] arch/xtensa/platforms/iss/simdisk.c: In function 'proc_write_simdisk': arch/xtensa/platforms/iss/simdisk.c:241:38: error: 'buffer' undeclared (first use in this function) arch/xtensa/platforms/iss/simdisk.c:241:38: note: each undeclared identifier is reported only once for each function it appears in Introduced by commit a69755b187749e7cc020e17127a54f395aea4eaa ("xtensa simdisk: switch to proc_create_data()") Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-05-09xtensa: ISS: fix timer_lock usage in rs_openMax Filippov
This fixes the following lockdep splat: [ 66.460000] ================================= [ 66.460000] [ INFO: inconsistent lock state ] [ 66.460000] 3.9.0-rc5-00161-ga48dd49 #4 Not tainted [ 66.460000] --------------------------------- [ 66.460000] inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. [ 66.460000] swapper/1 [HC0[0]:SC1[1]:HE1:SE0] takes: [ 66.460000] (timer_lock){+.?...}, at: [<d0006cde>] rs_poll+0x12/0xdc [ 66.460000] {SOFTIRQ-ON-W} state was registered at: [ 66.460000] [<d00421f0>] lock_acquire+0xec/0x13c [ 66.460000] [<d01ea036>] _raw_spin_lock+0x3a/0x84 [ 66.460000] [<d0006c8c>] rs_open+0x18/0x58 [ 66.460000] [<d0139ea2>] tty_open+0x262/0x3cc [ 66.460000] [<d00942e0>] chrdev_open+0x8c/0xe0 [ 66.460000] [<d00907b2>] do_dentry_open$isra$16+0x10e/0x190 [ 66.460000] [<d0091141>] finish_open+0x39/0x48 [ 66.460000] [<d009a0b4>] do_last$isra$34+0x6c4/0x824 [ 66.460000] [<d009a27a>] path_openat+0x66/0x310 [ 66.460000] [<d009a53a>] do_filp_open+0x16/0x44 [ 66.460000] [<d0091445>] do_sys_open+0xd5/0x13c [ 66.460000] [<d00914be>] sys_open+0x12/0x18 [ 66.460000] [<d0413ffc>] kernel_init_freeable+0xe4/0x12c [ 66.460000] [<d01e2a9c>] kernel_init+0xc/0x9c [ 66.460000] [<d00044fc>] ret_from_kernel_thread+0x8/0xc [ 66.460000] irq event stamp: 132542 [ 66.460000] hardirqs last enabled at (132542): [<d01ea2ec>] _raw_spin_unlock_irq+0x30/0x44 [ 66.460000] hardirqs last disabled at (132541): [<d01ea11e>] _raw_spin_lock_irq+0xe/0x8c [ 66.460000] softirqs last enabled at (132234): [<d0017d32>] __do_softirq+0x216/0x2a4 [ 66.460000] softirqs last disabled at (132539): [<d0018024>] irq_exit+0x38/0x40 [ 66.460000] [ 66.460000] other info that might help us debug this: [ 66.460000] Possible unsafe locking scenario: [ 66.460000] [ 66.460000] CPU0 [ 66.460000] ---- [ 66.460000] lock(timer_lock); [ 66.460000] <Interrupt> [ 66.460000] lock(timer_lock); [ 66.460000] [ 66.460000] *** DEADLOCK *** [ 66.460000] [ 66.460000] 1 lock held by swapper/1: [ 66.460000] #0: (((&serial_timer))){+.-...}, at: [<d001c65c>] call_timer_fn+0x0/0x1f0 [ 66.460000] Stack: d7c2fac0 00000018 00000004 00000001 d7c2faa0 00000004 00000006 d7c2fa90 9003e87c d7c2fae0 d7c30000 d025a87c 00000001 0000000f 00000000 d7c2fac0 9004005d d7c2fb10 d7c30000 d7c30338 00000001 00000001 00000000 d7c30338 [ 66.460000] Call Trace: [ 66.460000] [<d01e4f93>] print_usage_bug$part$26+0x1c3/0x1c8 [ 66.460000] [<d003e87c>] mark_lock+0x2b4/0x440 [ 66.460000] [<d004005d>] __lock_acquire+0x54d/0x16c4 [ 66.460000] [<d00421f0>] lock_acquire+0xec/0x13c [ 66.460000] [<d01ea036>] _raw_spin_lock+0x3a/0x84 [ 66.460000] [<d0006cde>] rs_poll+0x12/0xdc [ 66.460000] [<d001c71a>] call_timer_fn+0xbe/0x1f0 [ 66.460000] [<d001cd90>] run_timer_softirq+0x198/0x1f4 [ 66.460000] [<d0017c30>] __do_softirq+0x114/0x2a4 [ 66.460000] [<d0018024>] irq_exit+0x38/0x40 [ 66.460000] [<d00046c0>] do_IRQ+0x44/0x48 [ 66.460000] [<d0005c58>] do_interrupt+0x4c/0x54 [ 66.460000] [<d0003c80>] common_exception_return+0x0/0x5c [ 66.460000] [<d006682c>] free_pcppages_bulk+0x254/0x308 [ 66.460000] Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
2013-05-09xtensa: don't use a7 in simcallsMax Filippov
To support FRAME_POINTER avoid using a7 in __simc (none of the existing simcalls needs it). Replace calls to __simc with more specific simc_read, simc_write and simc_lseek calls. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
2013-05-09xtensa: provide default platform_pcibios_init implementationMax Filippov
This fixes the following build error: arch/xtensa/kernel/built-in.o:(.init.literal+0xe8): undefined reference to `platform_pcibios_init' arch/xtensa/kernel/built-in.o: In function `setup_arch': (.init.text+0x20e): undefined reference to `platform_pcibios_init' and allows platform to omit definition of platform_pcibios_init if it's empty. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
2013-05-09xtensa: fix ibreakenable register updateMax Filippov
Only set the register when there is at least one ibreak register, otherwise the build fails: arch/xtensa/kernel/head.S:105: Error: invalid register 'ibreakenable' for 'wsr' instruction arch/xtensa/platforms/iss/setup.c:67: Error: invalid register 'ibreakenable' for 'wsr' instruction Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
2013-05-07block_device_operations->release() should return voidAl Viro
The value passed is 0 in all but "it can never happen" cases (and those only in a couple of drivers) *and* it would've been lost on the way out anyway, even if something tried to pass something meaningful. Just don't bother. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-05-04xtensa simdisk: fix braino in "xtensa simdisk: switch to proc_create_data()"Al Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-04-09procfs: new helper - PDE_DATA(inode)Al Viro
The only part of proc_dir_entry the code outside of fs/proc really cares about is PDE(inode)->data. Provide a helper for that; static inline for now, eventually will be moved to fs/proc, along with the knowledge of struct proc_dir_entry layout. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-04-09xtensa simdisk: switch to proc_create_data()Al Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-02-26Merge tag 'xtensa-next-20130225' of git://github.com/czankel/xtensa-linuxLinus Torvalds
Pull xtensa update from Chris Zankel: "Added features: - add support for thread local storage (TLS) - add accept4 and finit_module syscalls - support medium-priority interrupts - add support for dc232c processor variant - support file-base simulated disk for ISS simulator Bug fixes: - fix return values returned by the str[n]cmp functions - avoid mmap cache aliasing - fix handling of 'windowed registers' in ptrace" * tag 'xtensa-next-20130225' of git://github.com/czankel/xtensa-linux: xtensa: add accept4 syscall xtensa: add support for TLS xtensa: add missing include asm/uaccess.h to checksum.h xtensa: do not enable GENERIC_GPIO by default xtensa: complete ptrace handling of register windows xtensa: add support for oprofile xtensa: move spill_registers to traps.h xtensa: ISS: add host file-based simulated disk xtensa: fix str[n]cmp return value xtensa: avoid mmap cache aliasing xtensa: add finit_module syscall xtensa: pull signal definitions from signal-defs.h xtensa: fix ipc_parse_version selection xtensa: dispatch medium-priority interrupts xtensa: Add config files for Diamond 233L - Rev C processor variant xtensa: use new common dtc rule xtensa: rename prom_update_property to of_update_property
2013-02-23xtensa: ISS: add host file-based simulated diskVictor Prupis
Simdisk is a block device that maps to a file in the host file system. It is usable for testing in the simulated environment, like xt-sim or QEMU. Device binding to host file may be changed at runtime via proc interface provided the device is not in use. Number of block devices and initial binding to host files is controlled via kernel/module parameters, with defaults specified in the kernel configuration. Signed-off-by: Victor Prupis <vnp@tensilica.com> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
2013-02-23xtensa: rename prom_update_property to of_update_propertyMax Filippov
This rename happened in 79d1c71 powerpc+of: Rename the drivers/of prom_* functions to of_*. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
2013-01-15TTY: switch tty_flip_buffer_pushJiri Slaby
Now, we start converting tty buffer functions to actually use tty_port. This will allow us to get rid of the need of tty in many call sites. Only tty_port will needed and hence no more tty_port_tty_get in those paths. Now, the one where most of tty_port_tty_get gets removed: tty_flip_buffer_push. IOW we also closed all the races in drivers not using tty_port_tty_get at all yet. Also we move tty_flip_buffer_push declaration from include/linux/tty.h to include/linux/tty_flip.h to all others while we are changing it anyway. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15TTY: switch tty_insert_flip_charJiri Slaby
Now, we start converting tty buffer functions to actually use tty_port. This will allow us to get rid of the need of tty in many call sites. Only tty_port will needed and hence no more tty_port_tty_get in those paths. tty_insert_flip_char is the next one to proceed. This one is used all over the code, so the patch is huge. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-12-18xtensa: set the correct ethernet address for xtfpgaChris Zankel
The last byte of the mac address is determined by a DIP switch, so update the OF property with that address. Signed-off-by: Chris Zankel <chris@zankel.net>
2012-12-18Use for_each_compatible_node() macro.Wei Yongjun
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
2012-12-18xtensa: add support for the XTFPGA boardsMax Filippov
The Avnet LX60/LX110/LX200 board is an FPGA board that can be configured with an Xtensa processor and an OpenCores Ethernet device. Signed-off-by: Chris Zankel <chris@zankel.net> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
2012-12-18xtensa: properly fix missing compiler barrier in simcallMax Filippov
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
2012-12-18xtensa: ISS: add BASE_BAUD definition to serial.hMax Filippov
This fixes the following build error in allyesconfig: drivers/tty/serial/8250/8250_early.c: In function 'parse_options': drivers/tty/serial/8250/8250_early.c:160:18: error: 'BASE_BAUD' undeclared (first use in this function) Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
2012-11-15TTY: call tty_port_destroy in the rest of driversJiri Slaby
After commit "TTY: move tty buffers to tty_port", the tty buffers are not freed in some drivers. This is because tty_port_destructor is not called whenever a tty_port is freed. This was an assumption I counted with but was unfortunately untrue. So fix the drivers to fulfil this assumption. To be sure, the TTY buffers (and later some stuff) are gone along with the tty_port, we have to call tty_port_destroy at tear-down places. This is mostly where the structure containing a tty_port is freed. This patch does exactly that -- put tty_port_destroy at those places. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-15xtensa: reorganize SR referencingMax Filippov
- reference SRs by names where possible, not by numbers; - get rid of __stringify around SR names where possible; - remove unneeded SR names from asm/regs.h; - add SREG_ prefix to remaining SR names; Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
2012-10-15xtensa: ISS: fix rs_put_charMax Filippov
ISS serial console prints garbage instead of symbols printed via rs_put_char. gcc optimizes away putting prined symbol into memory buffer because there's no evidence that the buffer is used afterwards. Make rs_put_char and rs_write use simc_write that has explicit wmb. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
2012-10-15xtensa: ISS: fix specific simcallsMax Filippov
Simcalls that take memory buffer definitely need wmb or rmb to make sure gcc doesn't optimize away code that fills the buffer. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
2012-10-09Merge tag 'xtensa-next-20121008' of git://github.com/czankel/xtensa-linuxLinus Torvalds
Pull Xtensa patchset from Chris Zankel: "The Xtensa tree has been broken for some time now, and this patchset brings it back to life. It has been part of the linux-next tree for some time. Most changes are inside the xtensa subdirectory; the other changes mostly add another rule to already existing #ifdefs to exclude Xtensa, where required. The only 'common' change is to add two more sections ('.xt.prop' and '.xt.lit') to the white list in modpost." * tag 'xtensa-next-20121008' of git://github.com/czankel/xtensa-linux: (27 commits) xtensa: Setup CROSS_COMPILE at the top xtensa: drop CONFIG_EMBEDDED_RAMDISK xtensa: fix TIOCGSERIAL and TIOCSSERIAL definitions xtensa: provide dummy gcc intrinsics xtensa: add missing symbol exports parport: disable for xtensa arch xtensa: rename MISC SR definition to avoid name clashes hisax: disable build for big-endian xtensa xtensa: fix CODA build xtensa: fix parallel make xtensa: ISS: drop unused io.c xtensa: ISS: exit simulator in case of halt or poweroff xtensa: ISS: change keyboard polling rate xtensa: ISS: add platform_pcibios_init xtensa: ISS: add dummy serial.h for ISS platform xtensa: change default platform clock frequency to 10MHz xtensa: add ARCH_WANT_OPTIONAL_GPIOLIB to xtensa config xtensa: set NO_IOPORT to 'n' by default xtensa: adopt generic io routines xtensa: fix ioremap ...
2012-10-03xtensa: ISS: drop unused io.cMax Filippov
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
2012-10-03xtensa: ISS: exit simulator in case of halt or poweroffMax Filippov
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
2012-10-03xtensa: ISS: change keyboard polling rateMax Filippov
Polling rate of once per 20 seconds seems to be too low. Increase it to 10 times per second. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
2012-10-03xtensa: ISS: add platform_pcibios_initMax Filippov
Provide pcibios initialization function in case PCI is enabled in the kernel config. This allows building kernel in allmodconfig configuration. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
2012-10-03xtensa: ISS: add dummy serial.h for ISS platformMax Filippov
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
2012-10-03xtensa: ISS: fix __simc implementationMax Filippov
Do not rely on compiler implicitly placing function arguments into specifc registers, place them explicitly. Move __simc and related helpers to platform/simcall.h Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
2012-10-03xtensa: ISS: only build networking if configuredMax Filippov
This allows building kernel in allnoconfig configuration. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
2012-08-13TTY: use tty_port_link_deviceJiri Slaby
So now for those drivers that can use neither tty_port_install nor tty_port_register_driver but still have tty_port available before tty_register_driver we use newly added tty_port_link_device. The rest of the drivers that still do not provide tty_struct <-> tty_port link will have to be converted to implement tty->ops->install. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08TTY: remove serialP.h inclusion from some filesJiri Slaby
All of them do not use the ugly interface defined in that header. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08TTY: iss/console, use tty_portJiri Slaby
Even though the port is not used for anything real there yet, this will change as tty buffers will be in tty_port in the near future. So the port will be needed in all drivers. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Chris Zankel <chris@zankel.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08XTENSA: iss/console, fix potential deadlockJiri Slaby
If the timer ticks while we are holding the spinlock, the system deadlocks. It is due to synchronous del_timer. So to fix that, use spinlocks that properly disable bottom halves. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Chris Zankel <chris@zankel.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08XTENSA: iss/console, use setup_timerJiri Slaby
Use setup_timer instead of explicit assignments. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Chris Zankel <chris@zankel.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08TTY: remove unneeded tty->index checksJiri Slaby
Checking if tty->index is in bounds is not needed. The tty has the index set in the initial open. This is done in get_tty_driver. And it can be only in interval <0,driver->num). So remove the tests which check exactly this interval. Some are left untouched as they check against the current backing device count. (Leaving apart that the check is racy in most of the cases.) Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08TTY: remove re-assignments to tty_driver membersJiri Slaby
All num, magic and owner are set by alloc_tty_driver. No need to re-set them on each allocation site. pti driver sets something different to what it passes to alloc_tty_driver. It is not a bug, since we don't use the lines parameter in any way. Anyway this is fixed, and now we do the right thing. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Acked-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>