diff options
author | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-11-14 10:47:01 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-11-14 10:47:01 -0500 |
commit | f2ecc3d0787e05d9145722feed01d4a11ab6bec1 (patch) | |
tree | 8b952af40dad67d728f1e421efc640907c523982 /drivers/staging/fwserial/fwserial.c | |
parent | b1cb7372fa822af6c06c8045963571d13ad6348b (diff) | |
parent | c14dd9d5f8beda9d8c621683b4e7d6cb5cd3cda7 (diff) |
Merge tag 'staging-4.15-rc1' into v4l_for_linus
There are some conflicts between staging and media trees,
as reported by Stephen Rothwell <sfr@canb.auug.org.au>.
So, merge from staging.
* tag 'staging-4.15-rc1': (775 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
...
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/staging/fwserial/fwserial.c')
-rw-r--r-- | drivers/staging/fwserial/fwserial.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/staging/fwserial/fwserial.c b/drivers/staging/fwserial/fwserial.c index 41a49c8194e5..bba7e9c888b3 100644 --- a/drivers/staging/fwserial/fwserial.c +++ b/drivers/staging/fwserial/fwserial.c @@ -217,13 +217,6 @@ static void fwtty_log_tx_error(struct fwtty_port *port, int rcode) } } -static void fwtty_txn_constructor(void *this) -{ - struct fwtty_transaction *txn = this; - - init_timer(&txn->fw_txn.split_timeout_timer); -} - static void fwtty_common_callback(struct fw_card *card, int rcode, void *payload, size_t len, void *cb_data) { @@ -1806,9 +1799,9 @@ static void fwserial_release_port(struct fwtty_port *port, bool reset) (*port->fwcon_ops->notify)(FWCON_NOTIFY_DETACH, port->con_data); } -static void fwserial_plug_timeout(unsigned long data) +static void fwserial_plug_timeout(struct timer_list *t) { - struct fwtty_peer *peer = (struct fwtty_peer *)data; + struct fwtty_peer *peer = from_timer(peer, t, timer); struct fwtty_port *port; spin_lock_bh(&peer->lock); @@ -1860,7 +1853,6 @@ static int fwserial_connect_peer(struct fwtty_peer *peer) fill_plug_req(pkt, peer->port); - setup_timer(&peer->timer, fwserial_plug_timeout, (unsigned long)peer); mod_timer(&peer->timer, jiffies + VIRT_CABLE_PLUG_TIMEOUT); spin_unlock_bh(&peer->lock); @@ -2098,7 +2090,7 @@ static int fwserial_add_peer(struct fw_serial *serial, struct fw_unit *unit) spin_lock_init(&peer->lock); peer->port = NULL; - init_timer(&peer->timer); + timer_setup(&peer->timer, fwserial_plug_timeout, 0); INIT_WORK(&peer->work, fwserial_peer_workfn); INIT_DELAYED_WORK(&peer->connect, fwserial_auto_connect); @@ -2863,7 +2855,7 @@ static int __init fwserial_init(void) fwtty_txn_cache = kmem_cache_create("fwtty_txn_cache", sizeof(struct fwtty_transaction), - 0, 0, fwtty_txn_constructor); + 0, 0, NULL); if (!fwtty_txn_cache) { err = -ENOMEM; goto unregister_loop; |