summaryrefslogtreecommitdiffstats
path: root/drivers/staging/dgnc/dgnc_driver.c
Commit message (Collapse)AuthorAgeFilesLines
* staging: dgnc: rename dgnc_tty_uninit() to dgnc_cleanup_tty()Daeseok Youn2016-09-271-1/+1
| | | | | | | | The dgnc_tty_uninit() doesn't match with dgnc_tty_init() at all. And also the dgnc_cleanup_tty() is only called for exiting the module. Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: introduce the dgnc_free_irq()Daeseok Youn2016-09-271-1/+10
| | | | | | | | The dgnc_free_irq() will free the requested IRQ from the dgnc_request_irq(). Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: rename dgnc_finalize_board_init() to dgnc_request_irq()Daeseok Youn2016-09-271-3/+3
| | | | | | | | The dgnc_finalize_board_init() function has only job for requesting the IRQ. It should be renamed to dgnc_request_irq() Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: introduce the dgnc_tty_unregister()Daeseok Youn2016-09-271-2/+5
| | | | | | | | The dgnc_tty_unregister() will be called when the dgnc_tty_register() is failed. Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: move functions unrelated with dgnc_found_board()Daeseok Youn2016-09-271-38/+43
| | | | | | | | The functions related with tty device initialization are needed to be moved from dgnc_found_board() to dgnc_init_one(). Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: kfree for board structure in dgnc_found_board()Daeseok Youn2016-09-271-8/+9
| | | | | | | | | The board structure should be freed when any function was failed in dgnc_found_board(). And the board strucure will be stored into dgnc_board array when the dgnc_found_board() function has no error. Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: missing NULL check for ioremap in dgnc_do_remap()Daeseok Youn2016-09-271-10/+21
| | | | | | | | | The ioremap() function can be failed, so it need to have error handling in dgnc_do_remap(). And also the return type of dgnc_do_remap() should be changed from "void" to "int" Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: remove useless message bufferDaeseok Youn2016-09-271-28/+0
| | | | | | | | | There is a temporary message buffer for the boot message in dgnc_found_board() but the buffer was not used anywhere in dgnc driver. Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: remove redundant initialization for channel arrayDaeseok Youn2016-09-271-3/+0
| | | | | | | | | The channel array in board_t was initialized in dgnc_found_board() with NULL. But the channel is going to initialize in dgnc_tty_init(). So the channel array doesn't need to set NULL for initailization. Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: Fix multi line comment alignmentFernando Apesteguia2016-09-121-25/+25
| | | | | | | | | Fix alignment in multi line comment block. Remove extra '*' to use the preferred comment style as in Documentation/CodingStyle Signed-off-by: Fernando Apesteguia <fernando.apesteguia@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: remove redundant null check inDaeseok Youn2016-08-151-3/+0
| | | | | | | | | | | | the "brd" was already checked for NULL before calling dgnc_do_remap(). the dgnc_do_remap() function was called only from the dgnc_found_board() and the DGNC_BOARD_MAGIC value was assigned to "brd->magic" in dgcn_found_board(). So it doesn't need to check about magic value. Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: remove redundant NULL check for brdDaeseok Youn2016-08-151-3/+0
| | | | | | | | | | | | | | the "brd" value cannot be NULL in dgnc_finalize_board_init(). Because "brd" as a parameter of this function was already checked for NULL. the dgnc_finalize_board_init() as a static function was called only from dgnc_found_board() function and brd->magic value was assigned once in dgnc_found_board(). So it doesn't need to check for DGNC_BOARD_MAGIC value. Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: add __exit macro to dgnc_driver.cJoshua Houghton2016-08-151-1/+1
| | | | | | | | Add the __exit macro to the dgnc_cleanup_module(void) function in dgnc_driver.c Signed-off-by: Joshua Houghton <josh@awful.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: fix CamelCase in dgnc_driver.cDaeseok Youn2016-03-281-26/+26
| | | | | | | fix checkpatch.pl warning about CamelCase. Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: cleanup properlySudip Mukherjee2016-03-111-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | dgnc_cleanup_module() was called when the module unloaded to do a total cleanup and it was also called if pci_register_driver() fails. But dgnc_cleanup_module() will try dgnc_remove_driver_sysfiles() but the sysfiles will be created only if pci_register_driver() succeeds. So if pci_register_driver() fails and we try dgnc_cleanup_module() then we were getting: [ 942.001479] BUG: unable to handle kernel NULL pointer dereference at 00000018 [ 942.001482] IP: [<c122c7a8>] sysfs_remove_file_ns+0x8/0x20 with part of the call trace as: [ 942.001544] Call Trace: [ 942.001555] [<c149acc6>] driver_remove_file+0x16/0x20 [ 942.001571] [<f864a708>] dgnc_remove_driver_sysfiles+0x18/0x40 [dgnc] [ 942.001575] [<f8643ac7>] dgnc_cleanup_module+0x47/0x260 [dgnc] [ 942.001577] [<f86cb000>] ? 0xf86cb000 [ 942.001580] [<f86cb1e6>] dgnc_init_module+0x1e6/0x1000 [dgnc] Lets have a separate cleanup function which will execute dgnc_remove_driver_sysfiles() depending on the argument passed to it. Reported-by: Navy Cheng <navych@126.com> Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: unregister pci driverSudip Mukherjee2016-03-111-2/+1
| | | | | | | | | | | | We may choose to load the module without the hardware present. That will register the pci driver but since probe will not succeed so dgnc_NumBoards will be 0. Now if we unload the module then the pci driver stays registered as dgnc_NumBoards is 0. And if we try to load the module again it fails with the error: "Driver 'dgnc' is already registered." Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: remove pci_unregister_driverSudip Mukherjee2016-03-111-14/+5
| | | | | | | | | | | If pci_register_driver() fails then dgnc_NumBoards can never be more than zero. dgnc_NumBoards is incremented only at the end of a successful probe. And moreover if the pci driver has failed to register then we never need to unregister it. Lets just print the warning, perform the cleanup and exit with the error code. Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: remove unneeded elseSudip Mukherjee2016-03-111-7/+7
| | | | | | | If pci_enable_device() fails then we can return directly. Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: dgnc_driver: Remove useless initialisationAmitoj Kaur Chawla2015-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Remove intialisation of a variable that is immediately reassigned. The semantic patch used to find this is: // <smpl> @@ type T; identifier x; constant C; expression e; @@ T x - = C ; x = e; // </smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: alignment styleSudip Mukherjee2015-10-121-1/+1
| | | | | | | | checkpatch was warning us that the alignment should match the open parenthesis. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: remove space after castSudip Mukherjee2015-10-121-3/+3
| | | | | | | Space is not necessary after typecast. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: remove blankline after braceSudip Mukherjee2015-10-121-3/+0
| | | | | | | | Blank lines are not needed after opening braces. checkpatch was giving us warnings about this. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: remove blankline before braceSudip Mukherjee2015-10-121-2/+0
| | | | | | | | Blank lines are not needed before closing braces. checkpatch was giving warning about this. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: remove multiple blank linesSudip Mukherjee2015-10-121-10/+0
| | | | | | | | checkpatch warns us about multiple blank lines which are not needed. Remove them. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: take a lock when storing value in dgnc_poll_tickSalah Triki2015-10-041-1/+1
| | | | | | | | Reads of dgnc_poll_tick are protected by dgnc_poll_lock spinlock, but the write to dgnc_poll_tick is not. It could theoretically race. Signed-off-by: Salah Triki <salah.triki@acm.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: remove dgnc_init_globals functionSudip Mukherjee2015-10-041-16/+2
| | | | | | | | | The dgnc_init_globals() function is only initializing the timer so initialize it directly and remove dgnc_init_globals() and change the comment appropriately. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: remove initialization of globalSudip Mukherjee2015-10-041-7/+0
| | | | | | | | globals variable will be initialied to 0 and the global pointers will be to NULL. No need to initialize them separately. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: delete all references to 'flipbuf'Gujulan Elango, Hari Prasath (H.)2015-05-311-9/+0
| | | | | | | | | This patch deletes all references to 'flipbuf'.Memory is allocated and freed but never used anywhere in the driver.Also deleted an ununsed Macro defined in the header file. Signed-off-by: Gujulan Elango Hari Prasath <hgujulan@visteon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* dgnc: get rid of dpacompat.h, move remaining stuff to digi.hGiedrius Statkevičius2015-03-241-1/+0
| | | | | | | | | Dpacompat.h contained a lot of unused #defines and only few things are used from it so since we've trimmed down digi.h, now we can delete dpacompat.h and move remaining stuff into digi.h. Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: dgnc: Use goto for error handlingQuentin Lambert2015-03-121-11/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces goto statments for error handling and in cases where a lock needs to be released. A simplified version of the semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr) @candidates exists@ identifier f, label; statement s; position p1, p2, p3; @@ f@p1(...) { ...when any if@p2(...) { ...when any s return@p3 ...; } ...when any } @good1 exists@ identifier candidates.f, candidates.label; statement candidates.s; position candidates.p1, candidates.p2; @@ f@p1(...) { ...when any if(...) { ...when any s return ...; } ...when any if@p2(...) {...} ...when any } @depends on good1@ identifier candidates.f, candidates.label; position candidates.p1, candidates.p3; @@ f@p1(...) { ...when any * return@p3 ...; } Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: dgnc: dgnc_driver: Add a missing call to dgnc_tty_uninitQuentin Lambert2015-03-121-0/+1
| | | | | | | | This function is called on the previous and the next failure branches. This patch adds the call on the branch where it seems to be missing. Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* dgnc: clean up comments at start of filesGiedrius Statkevičius2015-03-121-16/+0
| | | | | | | | | | | | | Remove FSF address because it's known in the past that it has changed. Also, remove the pointless "do not change the coding style" comments because it's one of the reasons why it's in staging and it's quite contradictory to what it says in TODO. Also, they contain wrong e-mails of people which are responsible for these drivers - see TODO or MAINTAINERS for that. We can preserve the original copyright at the top of the most files because it shows who originally made them. Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* dgnc: Remove unneeded dgnc_state array of stringsGiedrius Statkevičius2015-03-121-8/+0
| | | | | | | | Dgnc_state array of strings is never used anywhere and it seems pretty useless anyway since the board state enum names speak for themselves. Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: Use kcalloc instead of kzalloc.Navya Sri Nizamkari2015-03-121-1/+1
| | | | | | | | This patch uses kcalloc instead of kzalloc function. A coccinelle script was used to make this change. Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* dgnc: Make all lines under 80 characters in dgnc_driver.cGiedrius Statkevičius2015-03-121-7/+8
| | | | | | | | | Some of the lines are over 80 characters in dgnc_driver.c so fix them by moving the comments closer to the code, tidying the comments to make them smaller, and remove a redundant space after +. Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: dgnc: Fix checking return value of register_chrdevSalah Triki2015-03-061-2/+2
| | | | | | | | The failure code is negative. So check <0 instead of <=0. Return the failure code instead of -ENXIO. Signed-off-by: Salah Triki <salah.triki@acm.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: dgnc: Replace printk() with dev_dbg()Cristina Opriceana2015-03-011-2/+2
| | | | | | | | | | This patch replaces printk() with dev_dbg() in order to avoid the suggestion of using a more specific function while printing debug information. Warning found by checkpatch.pl. Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com> Reviewed-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: replace init_timer by setup_timerAya Mahfouz2015-02-261-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch replaces init_timer and the 2 step initialization of function and data by setup_timer to make the code more concise. The issue was discovered using the following coccinelle script: @@ expression ds, e1, e2; @@ -init_timer (&ds); +setup_timer (&ds, e1, e2); ... ( -ds.function = e1; ... -ds.data = e2; | -ds.data = e2; ... -ds.function = e1; ) Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: dgnc: Fix warning of code styleVatika Harlalka2015-02-241-1/+3
| | | | | | | | This patch fixes checkpatch.pl WARNING: Line longer than 80 chars. Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: fix long lines in PCI device tableKrzysztof Adamski2015-01-251-6/+6
| | | | | | | This patch fixes coding style of PCI device table declaration. Signed-off-by: Krzysztof Adamski <k@japko.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: implement proper error handling in dgnc_start()Alexey Khoroshilov2015-01-171-4/+24
| | | | | | | | | | | | dgnc_start() ignores errors in class_create() and device_create() and it does not deallocate resources if dgnc_tty_preinit() fails. The patch implements proper error handling. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: remove debug symbolsAya Mahfouz2014-10-281-9/+0
| | | | | | | | This patch removes all of the debug symbols and the variable dgnc_debug since they are not used anywhere in the code. Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: remove unused variable named rawreadokAya Mahfouz2014-10-281-2/+0
| | | | | | | | This patch removes the variable rawreadok since it is only intialized but not used in any of the driver functions. Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: dgnc_driver: remove all occurences of trcbuf_sizeAya Mahfouz2014-10-281-2/+0
| | | | | | | | | This patch removes the variable trcbuf_size given there is no real use for it anymore. All of the debug variables in this driver is basically dead code. Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: Remove non-standard APR/RAPR printing macrosRoberta Dobrescu2014-10-201-11/+9
| | | | | | | | | | | This patch removes non-standard macros used by dgnc driver for printing error or debugging messages. These are replaced by dev_err/dev_dbg (when possible) or pr_err. There were cases where the message is completely removed since is not adding any useful information. Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge tag 'tty-3.18-rc1' of ↵Linus Torvalds2014-10-081-13/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial driver updates from Greg KH: "Here's the big tty/serial driver patchset for 3.18-rc1. Lots of little things in here, some good work from Peter Hurley on the tty core, and in lots of drivers. There are also lots of other driver updates in here as well, full details in the changelogs. All have been in the linux-next tree for a while" * tag 'tty-3.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (99 commits) Revert "serial/core: Initialize the console pm state" tty: serial: 8250: use 32bit variable for rpm_tx_active tty: serial: msm: Add earlycon support serial/core: Initialize the console pm state serial: asc: Conditionally use readl_relaxed (COMPILE_TEST) serial: of-serial: add PM suspend/resume support m68k: AMIGA_BUILTIN_SERIAL should depend on TTY asm/uapi: Add definition of TIOC[SG]RS485 tty/metag_da: Add console_poll module parameter serial: 8250_pci: remove rts_n override from Baytrail quirk serial: cadence: Add generic earlycon support serial: imx: change the wait even to interruptiable serial: imx: terminate the RX DMA when the UART is suspending serial: imx: fix throttle/unthrottle callbacks for hardware assisted flow control serial: 8250: Add Quark X1000 to 8250_pci.c tty: omap-serial: pull out calculation from baud_is_mode16 tty: omap-serial: fix division by zero xen_hvc: no reason to write the type key on xenstore tty: serial: 8250_core: remove UART_IER_RDI in serial8250_stop_rx() tty: serial: 8250_core: use the ->line argument as a hint in serial8250_find_match_or_unused() ...
| * staging: dgnc: remove Neo card ids from device tableBill Pemberton2014-09-081-13/+0
| | | | | | | | | | | | | | | | The Digi Neo cards are supported by the jsm driver. Remove support for these cards from dgnc. Signed-off-by: Bill Pemberton <wfp5p@worldbroken.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: dgnc: Fix do not add new typedefsEbru Akagunduz2014-10-021-1/+1
| | | | | | | | | | | | | | | | This patch fixes "do not add new typedefs" checkpatch.pl warning in dgnc_types.h Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: dgnc: dgnc_driver.c: Replace non-standard spinlock's macrosRoberta Dobrescu2014-09-281-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch replaces non-standard spinlock's macros. It is done using coccinelle and the following semantic patch: @@ expression x; @@ - DGNC_SPINLOCK_INIT(x) + spin_lock_init(&x) @@ expression x, y; @@ - DGNC_LOCK(x, y) + spin_lock_irqsave(&x, y) @@ expression x, y; @@ - DGNC_UNLOCK(x, y) + spin_unlock_irqrestore(&x, y) @used_by_lock exists@ typedef ulong; symbol lock_flags; position p1, p2; @@ ( ulong lock_flags@p1; | unsigned long lock_flags@p2; ) ... ( spin_lock_irqsave(..., lock_flags) | spin_unlock_irqrestore(..., lock_flags) ) @@ position used_by_lock.p1, used_by_lock.p2; @@ ( - ulong lock_flags@p1; + unsigned long flags; | - unsigned long lock_flags@p2; + unsigned long flags; ) <... - lock_flags + flags ...> Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: dgnc: split two assignments into the two assignments on two lines.Seunghun Lee2014-09-021-4/+6
| | | | | | | | | | | | | | | | | | split two assignments into the two assignments on two lines. CC: Lidza Louina <lidza.louina@gmail.com> CC: Mark Hounschell <markh@compro.net> Signed-off-by: Seunghun Lee <waydi1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>