aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-09-26serial: pl011: handle corruption at high clock speedsLinus Walleij1-1/+14
This works around a few glitches in the ST version of the PL011 serial driver when using very high baud rates, as we do in the Ux500: 3, 3.25, 4 and 4.05 Mbps. Problem Observed/rootcause: When using high baud-rates, and the baudrate*8 is getting close to the provided clock frequency (so a division factor close to 1), when using bursts of characters (so they are abutted), then it seems as if there is not enough time to detect the beginning of the start-bit which is a timing reference for the entire character, and thus the sampling moment of character bits is moving towards the end of each bit, instead of the middle. Fix: Increase slightly the RX baud rate of the UART above the theoretical baudrate by 5%. This will definitely give more margin time to the UART_RX to correctly sample the data at the middle of the bit period. Also fix the ages old copy-paste error in the very stressed comment, it's referencing the registers used in the PL010 driver rather than the PL011 ones. Signed-off-by: Guillaume Jaunet <[email protected]> Signed-off-by: Christophe Arnal <[email protected]> Signed-off-by: Matthias Locher <[email protected]> Signed-off-by: Rajanikanth HV <[email protected]> Cc: stable <[email protected]> Cc: Bibek Basu <[email protected]> Cc: Par-Gunnar Hjalmdahl <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-26serial: sccnxp: Make 'default' choice in switch lastAlexander Shiyan1-1/+1
Signed-off-by: Alexander Shiyan <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-26serial: sccnxp: Remove mask termios caps for SW flow controlAlexander Shiyan1-1/+0
The kernel will handle IXON/IXOFF/IXANY in software if the hardware doesn't do it. Signed-off-by: Alexander Shiyan <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-26serial: sccnxp: Report actual baudrate back to coreAlexander Shiyan1-4/+10
Signed-off-by: Alexander Shiyan <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-26serial: samsung: Add poll_get_char & poll_put_charJulien Pichon1-0/+47
The following patch allows users to use KGDB over serial console on board based on Samsung SOC. It has been tested on a board using exynos5. [dianders: changed poll to return NO_POLL_CHAR, which appears to fix 'help' in kgdb; also updated commit message] Signed-off-by: Julien Pichon <[email protected]> Signed-off-by: Doug Anderson <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-26Powerpc 8xx CPM_UART setting MAXIDL register proportionaly to baud rateChristophe Leroy1-0/+14
MAXIDL is the timeout after which a receive buffer is closed when not full if no more characters are received. We calculate it from the baudrate so that the duration is always the same at standard rates: about 4ms. At 9600 bauds it gives a timeout of 4 characters, which is the timeout on the 8250 UART. Signed-off-by: Christophe Leroy <[email protected]> Acked-by: Alan Cox <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-26Powerpc 8xx CPM_UART maxidl should not depend on fifo sizeChristophe Leroy1-2/+2
maxidl register was set to fifo size. There is no reason to set this register to same value as fifo size. Setting it now to 0x10 by default as in the UCC UART driver. Signed-off-by: Christophe Leroy <[email protected]> Acked-by: Alan Cox <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-26Powerpc 8xx CPM_UART too many interruptsChristophe Leroy1-2/+2
Setting the fifo to only 1 byte generates one interrupt every 1ms at 9600 bauds. This is too much. This patch reduces the threshold to speeds below 2400 bauds like in the 8250 UART driver. Signed-off-by: Christophe Leroy <[email protected]> Acked-by: Alan Cox <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-26Powerpc 8xx CPM_UART desynchronisationChristophe Leroy1-0/+1
This patch fixes a desynchronisation problem with CPM UART driver on Powerpc MPC8xx. The problem happens if data is received before the device is open by the user application. Signed-off-by: Christophe Leroy <[email protected]> Acked-by: Alan Cox <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-26serial: set correct baud_base for EXSYS EX-41092 Dual 16950Flavio Leitner2-3/+7
Apparently the same card model has two IDs, so this patch complements the commit 39aced68d664291db3324d0fcf0985ab5626aac2 adding the missing one. Signed-off-by: Flavio Leitner <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-26serial: omap: fix the reciever line error caseShubhrajyoti D1-0/+4
This patch does the following - In case of errors if there least one data character in the RX FIFO read it otherwise it may stall the receiver. This is recommended in the interrupt reset method in the table 23-246 of the omap4 TRM. Signed-off-by: Shubhrajyoti D <[email protected]> Reviewed-by: Felipe Balbi <[email protected]> Tested-by: Kevin Hilman <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-268250: blacklist Winbond CIR portSean Young3-8/+31
The legacy serial driver will detect the Winbond CIR device as a serial port, since it looks exactly like a serial port unless you know what it is from the PNP ID. Here we track this port as a special PORT_8250_CIR type, preventing the legacy serial driver from probing it. Signed-off-by: Sean Young <[email protected]> Acked-by: Alan Cox <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-268250_pnp: do pnp probe before legacy probeSean Young5-31/+41
We first probe the legacy serial ports and then check pnp. If there is a non-standard configuration then this might not work, also this change is needed so we can blacklist Winbond CIR based on PNP ID. For this to work the 8250_pnp driver must be merged into the 8250 module. Signed-off-by: Sean Young <[email protected]> Acked-by: Alan Cox <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-26lis3lv02d: fix some comments specific to lis331dlh driverAnilKumar Ch3-8/+9
Fix some minor problems in comments of lis331dlh driver * correct comments with respect to 2G sensitivity * correct typo lis3331dlh mistake to lis331dlh * add comment to say only 2G range is supported * change the function name from lis3lv02d_read_16 to lis331dlh_read_data. * update i2c_device_id table entry to maintaine consistancy * update sensor display message Signed-off-by: AnilKumar Ch <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-26MISC: hpilo, remove pci_disable_deviceJiri Slaby1-2/+9
pci_disable_device(pdev) used to be in pci remove function. But this PCI device has two functions with interrupt lines connected to a single pin. The other one is a USB host controller. So when we disable the PIN there e.g. by rmmod hpilo, the controller stops working. It is because the interrupt link is disabled in ACPI since it is not refcounted yet. See acpi_pci_link_free_irq called from acpi_pci_irq_disable. It is not the best solution whatsoever, but as a workaround until the ACPI irq link refcounting is sorted out this should fix the reported errors. References: https://lkml.org/lkml/2008/11/4/535 Signed-off-by: Jiri Slaby <[email protected]> Cc: Grant Grundler <[email protected]> Cc: Nobin Mathew <[email protected]> Cc: Robert Hancock <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: David Altobelli <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-26pcmcia: synclink_cs: fix potential tty NULL dereferenceAlexey Khoroshilov1-7/+13
tty_port_tty_get() can return NULL after port hangup that may happen anytime. The patch adds checks that tty_port_tty_get() returns nonNULL around places where tty is actually used. I have no actual hardware to test the patch, so I have updated rx side processing from common sense only. v2: rx handling updated according Alan Cox feedback. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-26drivers/char/mmtimer.c: Remove useless kfreePeter Senna Tschudin1-2/+1
Remove useless kfree() and clean up code related to the removal. The semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r exists@ position p1,p2; expression x; @@ if (x@p1 == NULL) { ... kfree@p2(x); ... return ...; } @unchanged exists@ position r.p1,r.p2; expression e <= r.x,x,e1; iterator I; statement S; @@ if (x@p1 == NULL) { ... when != I(x,...) S when != e = e1 when != e += e1 when != e -= e1 when != ++e when != --e when != e++ when != e-- when != &e kfree@p2(x); ... return ...; } @ok depends on unchanged exists@ position any r.p1; position r.p2; expression x; @@ ... when != true x@p1 == NULL kfree@p2(x); @depends on !ok && unchanged@ position r.p2; expression x; @@ *kfree@p2(x); // </smpl> Signed-off-by: Peter Senna Tschudin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-26drivers/char: removes unnecessary semicolonPeter Senna Tschudin2-3/+3
removes unnecessary semicolon Found by Coccinelle: http://coccinelle.lip6.fr/ Signed-off-by: Peter Senna Tschudin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-26Documentation: Fixes some translation error in Documentation/zh_CN/gpio.txtTekkaman Ninja1-18/+14
Fixes some translation error in Documentation/zh_CN/gpio.txt The modification is based on Dong Aisheng <[email protected]>'s corrections: 1.Two "OUTPUT" is incorrectly translated as "输入"; 2.five improvement of translation; 3.Delete a redundant paragraph, Signed-off-by: Fu Wei <[email protected]> Acked-by: Harry Wei <[email protected]> Acked-by: Dong Aisheng <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-26Documentation: Remove 3 byte redundant code at the head of the ↵Tekkaman Ninja1-1/+1
Documentation/zh_CN/arm/booting Remove 3 byte redundant code at the head of the Documentation/zh_CN/arm/booting When I see the file Documentation/zh_CN/arm/booting using Bless(binary Viewer),I find 3 byte redundant in it. So I make a patch to correcting that error made by me. Signed-off-by: Fu Wei <[email protected]> Acked-by: Harry Wei <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-26Documentation: Chinese translation of Documentation/video4linux/omap3isp.txtTekkaman Ninja1-0/+277
This is a Chinese translated version of Documentation/video4linux/omap3isp.txt Signed-off-by: Fu Wei <[email protected]> Acked-by: Harry Wei <[email protected]> Cc: Laurent Pinchart <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-26staging: r8712u: Do not queue cloned skbLarry Finger1-1/+4
Some post-3.4 kernels have a problem when a cloned skb is used in the RX path. This patch handles one such case for r8712u. The patch was suggested by Eric Dumazet. Signed-off-by: Larry Finger <[email protected]> Cc: Stable <[email protected]> [v3.4+] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-26syscalls: add __NR_kcmp syscall to generic unistd.hMark Salter1-1/+3
Commit d97b46a64 ("syscalls, x86: add __NR_kcmp syscall" ) added a new syscall to support checkpoint restore. It is currently x86-only, but that restriction will be removed in a subsequent patch. Unfortunately, the kernel checksyscalls script had a bug which suppressed any warning to other architectures that the kcmp syscall was not implemented. A patch to checksyscalls is being tested in linux-next and other architectures are seeing warnings about kcmp being unimplemented. This patch adds __NR_kcmp to <asm-generic/unistd.h> so that kcmp is wired in for architectures using the generic syscall list. Signed-off-by: Mark Salter <[email protected]> Acked-by: Arnd Bergmann <[email protected]>
2012-09-26ktest: Fix ELSE IF statementsSteven Rostedt1-1/+3
The ELSE IF statements do not work as expected if another ELSE statement follows. This is because the $if_set is not set. If the ELSE IF condition is true, the following ELSE should be ignored. But because the $if_set is not set, the following ELSE will also be executed. Signed-off-by: Steven Rostedt <[email protected]>
2012-09-26perf evlist: Introduce set_filter() methodArnaldo Carvalho de Melo4-18/+48
To apply a filter to all the evsels in an evlist. Cc: David Ahern <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Mike Galbraith <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2012-09-26staging: comedi: ni_mio_common: always lock in ni_ai_poll()Ian Abbott1-5/+3
`ni_ai_poll()` currently acquires (and later releases) the comedi device's spin-lock iff `in_interrupt()` returns 0. However, it is only called during processing of a `COMEDI_POLL` ioctl so `in_interrupt()` will always return 0 in this case. Remove this test and acquire/release the spin-lock unconditionally. This eliminates a sparse warning about different lock contexts for basic block. Signed-off-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-26staging: comedi: s626: add FIXME commentIan Abbott1-0/+3
`s626_enc_insn_config()` is the `insn_config()` handler for a counter subdevice. The `data[0]` value is supposed to be one of the `INSN_CONFIG_...` constants defined in "comedi.h" indicating the type of configuration instruction, but this function seems to be using it as a variable value to preload the counter with. Various values of `data[0]` are going to cause `check_insn_config_length()` in the comedi core ("comedi_fops.c") to return an error, and this function won't be called in those cases. Most other values will log a warning to the kernel log. It's not entirely clear what constant should be checked for in `data[0]`, so add a "FIXME" comment for now. Signed-off-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-26staging: comedi: s626: don't dereference insn->dataIan Abbott1-1/+1
`s626_enc_insn_config()` is incorrectly dereferencing `insn->data` which is a pointer to user memory. It should be dereferencing the separate `data` parameter that points to a copy of the data in kernel memory. Signed-off-by: Ian Abbott <[email protected]> Reviewed-by: H Hartley Sweeten <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-26perf evlist: Renane set_filters method to apply_filtersArnaldo Carvalho de Melo4-4/+4
Because that is what it really does, i.e. it applies the filters that were parsed from the command line and stashed into the evsels they refer to. We'll need the set_filter method name to actually apply a filter to all the evsels in an evlist, for instance, to ask that a syswide tracer doesn't trace itself. Cc: David Ahern <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Mike Galbraith <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2012-09-26staging: comedi: s526: fix if() check in s526_gpct_winsn()H Hartley Sweeten1-1/+1
This if() check was flipped from a test for valid data params to a test for invalid params. As pointed out by Dan Carpenter, the orignal test was: if ((data[1] > data[0]) && (data[0] > 0)) { the flipped test should be: if (data[1] <= data[0]) ... Add the missing '='. Signed-off-by: H Hartley Sweeten <[email protected]> Reported-by: Dan Carpenter <[email protected]> Cc: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-26USB: Fix race condition when removing host controllersAlan Stern2-5/+3
This patch (as1607) fixes a race that can occur if a USB host controller is removed while a process is reading the /sys/kernel/debug/usb/devices file. The usb_device_read() routine uses the bus->root_hub pointer to determine whether or not the root hub is registered. The is not a valid test, because the pointer is set before the root hub gets registered and remains set even after the root hub is unregistered and deallocated. As a result, usb_device_read() or usb_device_dump() can access freed memory, causing an oops. The patch changes the test to use the hcd->rh_registered flag, which does get set and cleared at the appropriate times. It also makes sure to hold the usb_bus_list_lock mutex while setting the flag, so that usb_device_read() will become aware of new root hubs as soon as they are registered. Signed-off-by: Alan Stern <[email protected]> Reported-by: Don Zickus <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-26perf test: Add test to check we correctly parse and match syscall open parmsArnaldo Carvalho de Melo1-0/+116
It will set up a syscall open tracepoint event, generate an open with invalid flags, then check those flags were the ones reported in the tracepoint fired. For the filename we need vfs:getname, but that will go thru some more iterations as the vfs getname codebase is going thru changes lately. When that is in I'll just check that the perf_evsel__newtp constructor is not bailing out and then add it to the evlist, catch the event and check the filename against the one used in the 'open' call used to trigger the event. Cc: David Ahern <[email protected]> Cc: Eric Paris <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Jeff Layton <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Mike Galbraith <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2012-09-26perf evsel: Handle endianity in intval methodArnaldo Carvalho de Melo1-4/+34
We were relying on the info in pevent, but since we have it in perf_evsel, set up by the perf_session routine if read from a perf.data file or by whoever creates the evsels, use it. New 'perf test' entries will use it to parse locally generated events, in a non perf.data centered workflow. As well as use byteswap.h to get per arch optimized swap routines, like other parts of perf (header, perf_evsel__parse_sample, symbol, etc) already do. Cc: David Ahern <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Mike Galbraith <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2012-09-26staging: comedi: s626: cleanup comments in s626_initialize()H Hartley Sweeten1-81/+88
Cleanup the comments to follow the coding style of the kernel. Signed-off-by: H Hartley Sweeten <[email protected]> Cc: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-26staging: comedi: s626: remove clear of kzalloc'ed dataH Hartley Sweeten1-6/+0
The private data is kzalloc'ed. There is no need to set any of the initial data to '0'. Signed-off-by: H Hartley Sweeten <[email protected]> Cc: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-26staging: comedi: s626: remove 'WDInterval' from private dataH Hartley Sweeten1-7/+0
This variable is never used in the driver. Just remove it. Signed-off-by: H Hartley Sweeten <[email protected]> Cc: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-26staging: comedi: s626: remove 'ChargeEnabled' from private dataH Hartley Sweeten1-7/+0
This variable is never used in the driver. Just remove it. Signed-off-by: H Hartley Sweeten <[email protected]> Cc: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-26staging: comedi: s626: remove 'IsBoardRevA' commentH Hartley Sweeten1-23/+2
IsBoardRevA is not defined in the driver. Remove the comment about it. Signed-off-by: H Hartley Sweeten <[email protected]> Cc: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-26staging: comedi: s626: #if 0 out the "SAA7146 BUG WORKAROUND"H Hartley Sweeten1-36/+42
Until it's determined if this workaround can be removed, block out the code with an #if 0/#endif and remove the individual comments on each line. Signed-off-by: H Hartley Sweeten <[email protected]> Cc: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-26staging: comedi: s626: remove 'allocatedBuf' from private dataH Hartley Sweeten1-205/+194
This variable is only used to count the number of dma buffers allocated during the attach. If an allocation fails, the attach function exits with -ENOMEM. When this variable is checked later it will always be == 2. Just remove the variable and the check. This allows bringing the code back an indent level in s626_initialize(). Note, coding style issues in this function are not addressed yet. Signed-off-by: H Hartley Sweeten <[email protected]> Cc: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-26staging: comedi: s626: add final attach messageH Hartley Sweeten1-1/+3
Add a simple dev_info() message after a successfull attach. Change the final return to '0' to indicate success. Signed-off-by: H Hartley Sweeten <[email protected]> Cc: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-26staging: comedi: s626: remove unneeded clear of private dataH Hartley Sweeten1-3/+0
The private data is kzalloc'ed. All the variables in it are initially '0'. Signed-off-by: H Hartley Sweeten <[email protected]> Cc: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-26staging: comedi: s626: factor out the board init codeH Hartley Sweeten1-120/+126
To make the attach a bit cleaner, factor the board init code out of attach_pci() into a new function. Signed-off-by: H Hartley Sweeten <[email protected]> Cc: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-26staging: comedi: s626: cleanup request_irq in s626_attach_pci()H Hartley Sweeten1-15/+8
Only set dev->irq if request_irq is successfull. Remove the kernel message noise. Signed-off-by: H Hartley Sweeten <[email protected]> Cc: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-26staging: comedi: s626: factor out the dma buffer allocationH Hartley Sweeten1-27/+30
To make the attach a bit cleaner, factor the dma buffer allocation out of attach_pci() into a new function. Signed-off-by: H Hartley Sweeten <[email protected]> Cc: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-26staging: comedi: s626: remove unnecessary checks of 'devpriv->base_addr'H Hartley Sweeten1-27/+24
'devpriv->base_addr' is valid from this point on in the attach_pci() function. Remove the unnecessary checks. Signed-off-by: H Hartley Sweeten <[email protected]> Cc: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-26staging: comedi: s626: cleanup ioremap()H Hartley Sweeten2-9/+4
The local variable 'resourceStart' is only used in the ioremap() to hold the PCI bar 0 base address. Just use the pci_resource_start() directly in the ioremap(). Also, instead of assuming the resource size for the ioremap, use pci_resource_len() to get the actual size. Remove the kernel noise when the ioremap fails and change the error code from -ENODEV to -ENOMEM. Signed-off-by: H Hartley Sweeten <[email protected]> Cc: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-26staging: comedi: s626: remove 'got_regions' from private dataH Hartley Sweeten1-4/+2
This variable is only used as a flag to indicate that the pci device has been enabled and needs to be disabled in the detach. Use the comedi_device 'iobase' for this and remove the private data variable. Signed-off-by: H Hartley Sweeten <[email protected]> Cc: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-26staging: comedi: s626: remove unneeded local variable in attach_pci()H Hartley Sweeten1-6/+3
The 'result' variable is only used to check the return from comedi_pci_enable(). Just reuse the 'ret' variable. Also, remove the kernel noise and use the error code from comedi_pci_enable() instead of returning -ENODEV. Signed-off-by: H Hartley Sweeten <[email protected]> Cc: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-26staging: comedi: s626: use dev->board_name for resource nameH Hartley Sweeten1-4/+3
Instead of the literal string "s626", use the dev->board_name for the resource name when enabling the PCI device and requesting the irq. Signed-off-by: H Hartley Sweeten <[email protected]> Cc: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>