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

Commit 2b023f46 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller
Browse files

irda: convert sir device to net_device_ops

parent 0bd11f27
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -865,6 +865,12 @@ static int sirdev_close(struct net_device *ndev)
	return 0;
}

static const struct net_device_ops sirdev_ops = {
	.ndo_start_xmit	= sirdev_hard_xmit,
	.ndo_open	= sirdev_open,
	.ndo_stop	= sirdev_close,
	.ndo_do_ioctl	= sirdev_ioctl,
};
/* ----------------------------------------------------------------------------- */

struct sir_dev * sirdev_get_instance(const struct sir_driver *drv, const char *name)
@@ -908,10 +914,7 @@ struct sir_dev * sirdev_get_instance(const struct sir_driver *drv, const char *n
	dev->netdev = ndev;

	/* Override the network functions we need to use */
	ndev->hard_start_xmit = sirdev_hard_xmit;
	ndev->open = sirdev_open;
	ndev->stop = sirdev_close;
	ndev->do_ioctl = sirdev_ioctl;
	ndev->netdev_ops = &sirdev_ops;

	if (register_netdev(ndev)) {
		IRDA_ERROR("%s(), register_netdev() failed!\n", __func__);