diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-13 20:53:28 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-13 20:53:28 -0800 |
commit | 449fcf3ab0baf3dde9952385e6789f2ca10c3980 (patch) | |
tree | 180f10c2cdd63836e47725cddc8850ca7144091a /drivers/staging/dgnc | |
parent | 3c073991eb417b6f785ddc6afbbdc369eb84aa6a (diff) | |
parent | c14dd9d5f8beda9d8c621683b4e7d6cb5cd3cda7 (diff) |
Merge tag 'staging-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging and IIO updates from Greg KH:
"Here is the "big" staging and IIO driver update for 4.15-rc1.
Lots and lots of little changes, almost all minor code cleanups as the
Outreachy application process happened during this development cycle.
Also happened was a lot of IIO driver activity, and the typec USB code
moving out of staging to drivers/usb (same commits are in the USB tree
on a persistent branch to not cause merge issues.)
Overall, it's a wash, I think we added a few hundred more lines than
removed, but really only a few thousand were modified at all.
All of these have been in linux-next for a while. There might be a
merge issue with Al's vfs tree in the pi433 driver (take his changes,
they are always better), and the media tree with some of the odd
atomisp cleanups (take the media tree's version)"
* tag 'staging-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (507 commits)
staging: lustre: add SPDX identifiers to all lustre files
staging: greybus: Remove redundant license text
staging: greybus: add SPDX identifiers to all greybus driver files
staging: ccree: simplify ioread/iowrite
staging: ccree: simplify registers access
staging: ccree: simplify error handling logic
staging: ccree: remove dead code
staging: ccree: handle limiting of DMA masks
staging: ccree: copy IV to DMAable memory
staging: fbtft: remove redundant initialization of buf
staging: sm750fb: Fix parameter mistake in poke32
staging: wilc1000: Fix bssid buffer offset in Txq
staging: fbtft: fb_ssd1331: fix mirrored display
staging: android: Fix checkpatch.pl error
staging: greybus: loopback: convert loopback to use generic async operations
staging: greybus: operation: add private data with get/set accessors
staging: greybus: loopback: Fix iteration count on async path
staging: greybus: loopback: Hold per-connection mutex across operations
staging: greybus/loopback: use ktime_get() for time intervals
staging: fsl-dpaa2/eth: Extra headroom in RX buffers
...
Diffstat (limited to 'drivers/staging/dgnc')
-rw-r--r-- | drivers/staging/dgnc/dgnc_driver.c | 8 | ||||
-rw-r--r-- | drivers/staging/dgnc/dgnc_driver.h | 16 | ||||
-rw-r--r-- | drivers/staging/dgnc/dgnc_neo.c | 11 |
3 files changed, 7 insertions, 28 deletions
diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c index c1b6079384e9..d9bf5da1b8e5 100644 --- a/drivers/staging/dgnc/dgnc_driver.c +++ b/drivers/staging/dgnc/dgnc_driver.c @@ -291,7 +291,7 @@ static void dgnc_free_irq(struct dgnc_board *brd) * waiter needs to be woken up, and (b) whether the poller needs to * be rescheduled. */ -static void dgnc_poll_handler(ulong dummy) +static void dgnc_poll_handler(struct timer_list *unused) { struct dgnc_board *brd; unsigned long flags; @@ -323,7 +323,7 @@ static void dgnc_poll_handler(ulong dummy) if ((ulong)new_time >= 2 * dgnc_poll_tick) dgnc_poll_time = jiffies + dgnc_jiffies_from_ms(dgnc_poll_tick); - setup_timer(&dgnc_poll_timer, dgnc_poll_handler, 0); + timer_setup(&dgnc_poll_timer, dgnc_poll_handler, 0); dgnc_poll_timer.expires = dgnc_poll_time; spin_unlock_irqrestore(&dgnc_poll_lock, flags); @@ -392,8 +392,6 @@ static int dgnc_start(void) unsigned long flags; struct device *dev; - init_timer(&dgnc_poll_timer); - rc = register_chrdev(0, "dgnc", &dgnc_board_fops); if (rc < 0) { pr_err(DRVSTR ": Can't register dgnc driver device (%d)\n", rc); @@ -419,7 +417,7 @@ static int dgnc_start(void) /* Start the poller */ spin_lock_irqsave(&dgnc_poll_lock, flags); - setup_timer(&dgnc_poll_timer, dgnc_poll_handler, 0); + timer_setup(&dgnc_poll_timer, dgnc_poll_handler, 0); dgnc_poll_time = jiffies + dgnc_jiffies_from_ms(dgnc_poll_tick); dgnc_poll_timer.expires = dgnc_poll_time; spin_unlock_irqrestore(&dgnc_poll_lock, flags); diff --git a/drivers/staging/dgnc/dgnc_driver.h b/drivers/staging/dgnc/dgnc_driver.h index 764d6fe0d030..efdb11a5e27f 100644 --- a/drivers/staging/dgnc/dgnc_driver.h +++ b/drivers/staging/dgnc/dgnc_driver.h @@ -104,7 +104,6 @@ struct board_ops { * struct dgnc_board - Per board information. * @boardnum: Board number (0 - 32). * - * @type: Type of board. * @name: Product name. * @pdev: Pointer to the pci_dev structure. * @bd_flags: Board flags. @@ -140,13 +139,9 @@ struct board_ops { * @dpastatus: Board status as defined by DPA. * @bd_dividend: Board/UART's specific dividend. * @bd_ops: Pointer to board operations structure. - * @proc_entry_pointer: Proc/<board> entry - * @dgnc_board_table: Proc/<board> entry */ struct dgnc_board { int boardnum; - - int type; char *name; struct pci_dev *pdev; unsigned long bd_flags; @@ -200,10 +195,6 @@ struct dgnc_board { uint bd_dividend; struct board_ops *bd_ops; - - struct proc_dir_entry *proc_entry_pointer; - struct dgnc_proc_entry *dgnc_board_table; - }; /* Unit flag definitions for un_flags. */ @@ -233,7 +224,6 @@ struct device; */ struct un_t { struct channel_t *un_ch; - ulong un_time; uint un_type; uint un_open_count; struct tty_struct *un_tty; @@ -321,8 +311,6 @@ struct un_t { * @ch_err_overrun: Count of overruns on channel. * @ch_xon_sends: Count of xons transmitted. * @ch_xoff_sends: Count of xoffs transmitted. - * @proc_entry_pointer: Proc/<board>/<channel> entry. - * @dgnc_channel_table: Proc/<board>/<channel> entry. */ struct channel_t { struct dgnc_board *ch_bd; @@ -391,10 +379,6 @@ struct channel_t { ulong ch_xon_sends; ulong ch_xoff_sends; - - struct proc_dir_entry *proc_entry_pointer; - struct dgnc_proc_entry *dgnc_channel_table; - }; extern uint dgnc_major; /* Our driver/mgmt major */ diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c index 1943e66fec57..0ae229c3aaaa 100644 --- a/drivers/staging/dgnc/dgnc_neo.c +++ b/drivers/staging/dgnc/dgnc_neo.c @@ -1182,7 +1182,6 @@ static int neo_drain(struct tty_struct *tty, uint seconds) unsigned long flags; struct channel_t *ch; struct un_t *un; - int rc = 0; if (!tty) return -ENXIO; @@ -1199,12 +1198,10 @@ static int neo_drain(struct tty_struct *tty, uint seconds) un->un_flags |= UN_EMPTY; spin_unlock_irqrestore(&ch->ch_lock, flags); - rc = wait_event_interruptible_timeout(un->un_flags_wait, - ((un->un_flags & UN_EMPTY) == 0), - msecs_to_jiffies(seconds * 1000)); - - /* If ret is non-zero, user ctrl-c'ed us */ - return rc; + /* If returned value is non-zero, user ctrl-c'ed us */ + return wait_event_interruptible_timeout(un->un_flags_wait, + ((un->un_flags & UN_EMPTY) == 0), + msecs_to_jiffies(seconds * 1000)); } /* |