Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751791AbdGYRNO (ORCPT ); Tue, 25 Jul 2017 13:13:14 -0400 Received: from aibo.runbox.com ([91.220.196.211]:51916 "EHLO aibo.runbox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751471AbdGYRNN (ORCPT ); Tue, 25 Jul 2017 13:13:13 -0400 From: Egil Hjelmeland To: corbet@lwn.net, andrew@lunn.ch, vivien.didelot@savoirfairelinux.com, f.fainelli@gmail.com, davem@davemloft.net, kernel@pengutronix.de, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: Egil Hjelmeland Subject: [PATCH net-next v2 10/10] net: dsa: lan9303: Only allocate 3 ports Date: Tue, 25 Jul 2017 18:15:53 +0200 Message-Id: <20170725161553.30147-11-privat@egil-hjelmeland.no> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170725161553.30147-1-privat@egil-hjelmeland.no> References: <20170725161553.30147-1-privat@egil-hjelmeland.no> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 903 Lines: 32 Saving 2628 bytes. Signed-off-by: Egil Hjelmeland Reviewed-by: Florian Fainelli --- drivers/net/dsa/lan9303-core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/dsa/lan9303-core.c b/drivers/net/dsa/lan9303-core.c index dc95973d62ed..ad7a4c72e1fb 100644 --- a/drivers/net/dsa/lan9303-core.c +++ b/drivers/net/dsa/lan9303-core.c @@ -23,6 +23,8 @@ #include "lan9303.h" +#define LAN9303_NUM_PORTS 3 + /* 13.2 System Control and Status Registers * Multiply register number by 4 to get address offset. */ @@ -1361,7 +1363,7 @@ static struct dsa_switch_ops lan9303_switch_ops = { static int lan9303_register_switch(struct lan9303 *chip) { - chip->ds = dsa_switch_alloc(chip->dev, DSA_MAX_PORTS); + chip->ds = dsa_switch_alloc(chip->dev, LAN9303_NUM_PORTS); if (!chip->ds) return -ENOMEM; -- 2.11.0