From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756661AbdGXPon (ORCPT ); Mon, 24 Jul 2017 11:44:43 -0400 Received: from mail1.bemta5.messagelabs.com ([195.245.231.151]:62093 "EHLO mail1.bemta5.messagelabs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756572AbdGXPoM (ORCPT ); Mon, 24 Jul 2017 11:44:12 -0400 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrFIsWRWlGSWpSXmKPExsVyeL7SP91TomW RBtMnclicv3uI2eLJgXZGiznnW1gsfr07wm6xaupOFouFbUtYLC7vmsNmcWyBmMWsI/uZHDg9 tqy8yeSxc9Zddo+dOz4zeSzum8zq0f/XwOPKxrlMHp83yQWwR7Fm5iXlVySwZjz5PYGl4CpbR feTw+wNjA9Yuxg5OYQE1jJK7J7k38XIBWQvYJRYdf0qWIJNwFhi1/TNTCA2i4CqxJwlT9lAbG EBe4klM76ygTSICLxnlPgwexdYEbOAosSq5+eZQWxeAUGJkzOfsEDEJSQOvngBFOcAirtJ3Fx cA7FYRmLykslMIGEJAXmJcweKQMISAnESm9a+YJ7AyDsLyaBZSAYtYGRaxahRnFpUllqka2is l1SUmZ5RkpuYmaNraGCql5taXJyYnpqTmFSsl5yfu4kRGMIMQLCD8d82z0OMkhxMSqK8Qkxlk UJ8SfkplRmJxRnxRaU5qcWHGGU4OJQkeBeLAOUEi1LTUyvSMnOA0QSTluDgURLh3QeS5i0uSM wtzkyHSJ1iNOaY8n/NFyaOpg9bvjAJseTl56VKifPWgpQKgJRmlObBDYJF+SVGWSlhXkag04R 4ClKLcjNLUOVfMYpzMCoJ8/aATOHJzCuB2/cK6BQmoFPmzCgFOaUkESEl1cAo6XJrUZGETMNU if4+f6UnEs8NLK0zXmxO7hPbzdL8YmaejlDn3yVnIixTzyR83CWhJsDalcOcUeT69rHVq5LlX G9TMvJucxU5Som0V51if1G3bPccw4/PPwckv313g3Exa9+7tpU3/SerMV5aVOub8e5UaGVhdL KomdWsOy9NfSLfztCSfK/EUpyRaKjFXFScCACqUnRo7QIAAA== X-Env-Sender: Egil.Hjelmeland@zenitel.com X-Msg-Ref: server-10.tower-180.messagelabs.com!1500911049!99996049!3 X-Originating-IP: [195.159.34.254] X-StarScan-Received: X-StarScan-Version: 9.4.25; banners=zenitel.com,-,- X-VirusChecked: Checked From: Egil Hjelmeland Date: Thu, 20 Jul 2017 12:35:59 +0200 Subject: [PATCH 10/13] net: dsa: lan9303: Only allocate 3 ports To: , , , , , , , , CC: MIME-Version: 1.0 Content-Type: text/plain Message-ID: <9c01203909bc4a89a719050ca80c4b58@nooslMX1.zenitelcss.com> X-Originating-IP: [10.5.202.90] X-ClientProxiedBy: nooslMX1.zenitelcss.com (10.5.2.91) To nooslMX1.zenitelcss.com (10.5.2.91) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Saving 2628 bytes. Signed-off-by: Egil Hjelmeland --- 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 DISCLAIMER: This e-mail may contain confidential and privileged material for the sole use of the intended recipient. Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply e-mail and delete all copies of this message.