Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2ed343f9 authored by Allen Pais's avatar Allen Pais Committed by David S. Miller
Browse files

net:nfc: use setup_timer



Use setup_timer function instead of initializing timer with the
    function and data fields.

Signed-off-by: default avatarAllen Pais <allen.lkml@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8701352b
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -1094,9 +1094,8 @@ struct nfc_dev *nfc_allocate_device(struct nfc_ops *ops,
	dev->targets_generation = 1;

	if (ops->check_presence) {
		init_timer(&dev->check_pres_timer);
		dev->check_pres_timer.data = (unsigned long)dev;
		dev->check_pres_timer.function = nfc_check_pres_timeout;
		setup_timer(&dev->check_pres_timer, nfc_check_pres_timeout,
			    (unsigned long)dev);

		INIT_WORK(&dev->check_pres_work, nfc_check_pres_work);
	}