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

Commit d4cc5976 authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'net-lan78xx-Minor-improvements'



Stefan Wahren says:

====================
net: lan78xx: Minor improvements

This patch series contains some minor improvements for the lan78xx
driver.

Changes in V2:
- Keep Copyright comment as multi-line
- Add Raghuram's Reviewed-by
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 7848418e 51ceac9f
Loading
Loading
Loading
Loading
+13 −21
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0+
/*
 * Copyright (C) 2015 Microchip Technology
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
#include <linux/version.h>
#include <linux/module.h>
@@ -2952,6 +2940,11 @@ static int lan78xx_bind(struct lan78xx_net *dev, struct usb_interface *intf)
	int i;

	ret = lan78xx_get_endpoints(dev, intf);
	if (ret) {
		netdev_warn(dev->net, "lan78xx_get_endpoints failed: %d\n",
			    ret);
		return ret;
	}

	dev->data[0] = (unsigned long)kzalloc(sizeof(*pdata), GFP_KERNEL);

@@ -3761,7 +3754,6 @@ static int lan78xx_probe(struct usb_interface *intf,
	ret = lan78xx_bind(dev, intf);
	if (ret < 0)
		goto out2;
	strcpy(netdev->name, "eth%d");

	if (netdev->mtu > (dev->hard_mtu - netdev->hard_header_len))
		netdev->mtu = dev->hard_mtu - netdev->hard_header_len;
+1 −13
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0+ */
/*
 * Copyright (C) 2015 Microchip Technology
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
#ifndef _LAN78XX_H
#define _LAN78XX_H