From patchwork Mon Jan 26 06:55:18 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 20266 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 27BA3DE12F for ; Mon, 26 Jan 2009 18:02:19 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751301AbZAZG5U (ORCPT ); Mon, 26 Jan 2009 01:57:20 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751285AbZAZG5U (ORCPT ); Mon, 26 Jan 2009 01:57:20 -0500 Received: from rv-out-0506.google.com ([209.85.198.238]:47111 "EHLO rv-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751263AbZAZG5T (ORCPT ); Mon, 26 Jan 2009 01:57:19 -0500 Received: by rv-out-0506.google.com with SMTP id k40so5726627rvb.1 for ; Sun, 25 Jan 2009 22:57:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:date:message-id :subject; bh=/IyL+GCyBOx+noWA1GYhyd8d12gC9WamqzXRmbjpWsQ=; b=OerfyIMkphCgQtQcrgFnp2W0JYWbhsS30UnmHn2js8vC+mWwFPoINDNwRiCCWi48Hk qDijL3YySIlu+AsJcWOS6YXgGoKR2XEEyMEchLdU1XhmgTRmyHtBgocYAL5WTBFw7+4D 72RbbexSWanbt8xZnriatCB1cddzX/XDt0cTU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:date:message-id:subject; b=CGnbLWk2E/ziiRq3OASkNQ62tFMqkUBbr1r4dYLM/A8d/bPdDRGEMlpkaVgR5hLK/i JNe3v5mChvRpZkgGoT/wcECZeQPmXpmMyG4yGK5MCcjmn0vN5Eyo78Qp7Dom88Uny1uk XbAG9S5sG6/nb9jY0JdNP7V3MwlNzF0RZIqxE= Received: by 10.115.18.3 with SMTP id v3mr2410190wai.32.1232953038529; Sun, 25 Jan 2009 22:57:18 -0800 (PST) Received: from rx1.opensource.se (mailhost.igel.co.jp [219.106.231.130]) by mx.google.com with ESMTPS id n22sm19237744pof.2.2009.01.25.22.57.16 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 25 Jan 2009 22:57:17 -0800 (PST) From: Magnus Damm To: netdev@vger.kernel.org Cc: Magnus Damm , nico@cam.org, davem@davemloft.net Date: Mon, 26 Jan 2009 15:55:18 +0900 Message-Id: <20090126065518.16879.7531.sendpatchset@rx1.opensource.se> Subject: [PATCH] smc91x: struct net_device_ops Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Magnus Damm Convert the smc91x driver to use struct net_device_ops. Signed-off-by: Magnus Damm --- drivers/net/smc91x.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 0001/drivers/net/smc91x.c +++ work/drivers/net/smc91x.c 2009-01-26 12:31:04.000000000 +0900 @@ -1768,6 +1768,19 @@ static const struct ethtool_ops smc_etht .set_eeprom = smc_ethtool_seteeprom, }; +static const struct net_device_ops smc_netdev_ops = { + .ndo_open = smc_open, + .ndo_stop = smc_close, + .ndo_start_xmit = smc_hard_start_xmit, + .ndo_tx_timeout = smc_timeout, + .ndo_set_multicast_list = smc_set_multicast_list, + .ndo_validate_addr = eth_validate_addr, + .ndo_set_mac_address = eth_mac_addr, +#ifdef CONFIG_NET_POLL_CONTROLLER + .ndo_poll_controller = smc_poll_controller, +#endif +}; + /* * smc_findirq * @@ -1977,16 +1990,9 @@ static int __devinit smc_probe(struct ne /* Fill in the fields of the device structure with ethernet values. */ ether_setup(dev); - dev->open = smc_open; - dev->stop = smc_close; - dev->hard_start_xmit = smc_hard_start_xmit; - dev->tx_timeout = smc_timeout; dev->watchdog_timeo = msecs_to_jiffies(watchdog); - dev->set_multicast_list = smc_set_multicast_list; + dev->netdev_ops = &smc_netdev_ops; dev->ethtool_ops = &smc_ethtool_ops; -#ifdef CONFIG_NET_POLL_CONTROLLER - dev->poll_controller = smc_poll_controller; -#endif tasklet_init(&lp->tx_task, smc_hardware_send_pkt, (unsigned long)dev); INIT_WORK(&lp->phy_configure, smc_phy_configure);