Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759844AbZDQHqy (ORCPT ); Fri, 17 Apr 2009 03:46:54 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755455AbZDQHql (ORCPT ); Fri, 17 Apr 2009 03:46:41 -0400 Received: from relay.atmel.no ([80.232.32.139]:55652 "EHLO relay.atmel.no" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754634AbZDQHqk (ORCPT ); Fri, 17 Apr 2009 03:46:40 -0400 Date: Fri, 17 Apr 2009 09:46:02 +0200 From: Haavard Skinnemoen To: Ben Nizette Cc: "Ferre, Nicolas" , jgarzik@pobox.com, netdev@vger.kernel.org, linux-kernel Subject: Re: [PATCH] macb: Kconfig net device compat fixup Message-ID: <20090417094602.51ec1b21@hskinnemoen-d830> In-Reply-To: <1239953045.2837.58.camel@linux-51e8.site> References: <1239953045.2837.58.camel@linux-51e8.site> X-Mailer: Claws Mail 3.6.1 (GTK+ 2.16.1; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2204 Lines: 69 Ben Nizette wrote: > > The macb driver hasn't been updated to use net_device_ops and as such > should select COMPAT_NET_DEV_OPS to avoid build breakage. Hmmm...no other drivers do that... > Of course really macb should be updated but in the mean time, this at > least avoid randconfig problems. It doesn't look all that difficult. Could you try the below instead? Haavard =============[cut here]===================== From: Haavard Skinnemoen Date: Fri, 17 Apr 2009 09:43:14 +0200 Subject: [PATCH] macb: convert to net_device_ops Signed-off-by: Haavard Skinnemoen --- drivers/net/macb.c | 19 +++++++++++++------ 1 files changed, 13 insertions(+), 6 deletions(-) diff --git a/drivers/net/macb.c b/drivers/net/macb.c index d473540..5656e02 100644 --- a/drivers/net/macb.c +++ b/drivers/net/macb.c @@ -1084,6 +1084,18 @@ static int macb_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) return phy_mii_ioctl(phydev, if_mii(rq), cmd); } +static const struct net_device_ops macb_netdev_ops = { + .ndo_open = macb_open, + .ndo_stop = macb_close, + .ndo_start_xmit = macb_start_xmit, + .ndo_get_stats = macb_get_stats, + .ndo_set_multicast_list = macb_set_rx_mode, + .ndo_do_ioctl = macb_ioctl, + .ndo_validate_addr = eth_validate_addr, + .ndo_change_mtu = eth_change_mtu, + .ndo_set_mac_address = eth_mac_addr, +}; + static int __init macb_probe(struct platform_device *pdev) { struct eth_platform_data *pdata; @@ -1159,12 +1171,7 @@ static int __init macb_probe(struct platform_device *pdev) goto err_out_iounmap; } - dev->open = macb_open; - dev->stop = macb_close; - dev->hard_start_xmit = macb_start_xmit; - dev->get_stats = macb_get_stats; - dev->set_multicast_list = macb_set_rx_mode; - dev->do_ioctl = macb_ioctl; + dev->netdev_ops = &macb_netdev_ops; netif_napi_add(dev, &bp->napi, macb_poll, 64); dev->ethtool_ops = &macb_ethtool_ops; -- 1.6.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/