From patchwork Fri Jan 16 04:57:15 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masakazu Mokuno X-Patchwork-Id: 18914 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 DCEDFDE041 for ; Fri, 16 Jan 2009 16:33:53 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753037AbZAPFdv (ORCPT ); Fri, 16 Jan 2009 00:33:51 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752811AbZAPFdu (ORCPT ); Fri, 16 Jan 2009 00:33:50 -0500 Received: from ms14-1.Sony.CO.JP ([211.125.136.232]:34944 "EHLO ms14.sony.co.jp" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752478AbZAPFdt (ORCPT ); Fri, 16 Jan 2009 00:33:49 -0500 X-Greylist: delayed 2180 seconds by postgrey-1.27 at vger.kernel.org; Fri, 16 Jan 2009 00:33:49 EST Received: from ms4.sony.co.jp (ms4.Sony.CO.JP [211.125.136.198]) by ms14.sony.co.jp (R8/Sony) with ESMTP id n0G4xcJS020809 for ; Fri, 16 Jan 2009 13:59:38 +0900 (JST) Received: from mta8.sony.co.jp (mta8.Sony.CO.JP [137.153.71.15]) by ms4.sony.co.jp (R8/Sony) with ESMTP id n0G4vJP3014373; Fri, 16 Jan 2009 13:57:20 +0900 (JST) Received: from mta8.sony.co.jp (localhost [127.0.0.1]) by mta8.sony.co.jp (R8/Sony) with ESMTP id n0G4vJst024016; Fri, 16 Jan 2009 13:57:19 +0900 (JST) Received: from smail1.sm.sony.co.jp (smail1.sm.sony.co.jp [43.11.253.1]) by mta8.sony.co.jp (R8/Sony) with ESMTP id n0G4vJpu024013; Fri, 16 Jan 2009 13:57:19 +0900 (JST) Received: from imail.sm.sony.co.jp (imail.sm.sony.co.jp [43.4.141.32]) by smail1.sm.sony.co.jp (8.11.6p2/8.11.6) with ESMTP id n0G4vH223618; Fri, 16 Jan 2009 13:57:17 +0900 (JST) Received: from [43.4.146.40] (bluenote.sm.sony.co.jp [43.4.146.40]) by imail.sm.sony.co.jp (8.12.11/3.7W) with ESMTP id n0G4v3ed028564; Fri, 16 Jan 2009 13:57:03 +0900 (JST) Date: Fri, 16 Jan 2009 13:57:15 +0900 From: Masakazu Mokuno To: jgarzik@pobox.com Subject: [PATCH] PS3: gelic: convert to net_device_ops Cc: netdev@vger.kernel.org, Geoff Levand Message-Id: <20090116134050.0B5B.40F06B3A@sm.sony.co.jp> MIME-Version: 1.0 X-Mailer: Becky! ver. 2.47.01 [ja] Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Convert the gelic driver to net_device_ops Signed-off-by: Masakazu Mokuno --- drivers/net/ps3_gelic_net.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) --- a/drivers/net/ps3_gelic_net.c +++ b/drivers/net/ps3_gelic_net.c @@ -1403,6 +1403,18 @@ void gelic_net_tx_timeout(struct net_dev atomic_dec(&card->tx_timeout_task_counter); } +static const struct net_device_ops gelic_netdevice_ops = { + .ndo_open = gelic_net_open, + .ndo_stop = gelic_net_stop, + .ndo_start_xmit = gelic_net_xmit, + .ndo_set_multicast_list = gelic_net_set_multi, + .ndo_change_mtu = gelic_net_change_mtu, + .ndo_tx_timeout = gelic_net_tx_timeout, +#ifdef CONFIG_NET_POLL_CONTROLLER + .ndo_poll_controller = gelic_net_poll_controller, +#endif +}; + /** * gelic_ether_setup_netdev_ops - initialization of net_device operations * @netdev: net_device structure @@ -1412,21 +1424,12 @@ void gelic_net_tx_timeout(struct net_dev static void gelic_ether_setup_netdev_ops(struct net_device *netdev, struct napi_struct *napi) { - netdev->open = &gelic_net_open; - netdev->stop = &gelic_net_stop; - netdev->hard_start_xmit = &gelic_net_xmit; - netdev->set_multicast_list = &gelic_net_set_multi; - netdev->change_mtu = &gelic_net_change_mtu; - /* tx watchdog */ - netdev->tx_timeout = &gelic_net_tx_timeout; netdev->watchdog_timeo = GELIC_NET_WATCHDOG_TIMEOUT; /* NAPI */ netif_napi_add(netdev, napi, gelic_net_poll, GELIC_NET_NAPI_WEIGHT); netdev->ethtool_ops = &gelic_ether_ethtool_ops; -#ifdef CONFIG_NET_POLL_CONTROLLER - netdev->poll_controller = gelic_net_poll_controller; -#endif + netdev->netdev_ops = &gelic_netdevice_ops; } /**