Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp4372672ybi; Mon, 15 Jul 2019 08:00:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqybEJbR55NQp2+bGjU9tJbBPzTjUq5JYtsMZv0ScGdL27GMeeUjhJEwWj5BF32W7SpBGCaV X-Received: by 2002:a63:fa0d:: with SMTP id y13mr27289758pgh.258.1563202837621; Mon, 15 Jul 2019 08:00:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563202837; cv=none; d=google.com; s=arc-20160816; b=YMDN1OOqmHdvtjiaE/GvekExaGBL066NvE6BSs8ffbboWDtGQWnXKsCNPVhDrqDb6i XTAZid40KMD5U4KZOaIpxLIQ8Y0iOOSZfLgGiDDgVm8ky8MET3U+WSmbuz8B6rZ0O9sn oZE5RczWxvhRvY0+AImnczL+v6jij+SyZ7i5aByrAhd1lL2AVj78rduSjZu1kyp4IB9i kqg1dfdIRCmhbxdnds45nSgDIhtdVE+j7ZXe0qJBcMgepfwj3PASkCQbmbBtGRKFliWm FQZbVmgHXb9/eMZKr5omoHV0Ryr6P4NSBfT5Uw6XXTLshrcEea2RhYnnE4sStCTE45Q7 gLwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=GgOwCyhS1amdO36jU7D3eoOK9u16aRGPbweZlj9hwgo=; b=w6HgNh3XHvOszFwqUEFvlL1PGvYPvHwjkv60hNzvqATwzJuWpO1AUCltetJEdTttjc uWDKHLTIbEpT64DzRNGjf2ucbnBRocBf4gaSeRb3k93kSueFRqMEf/Ei5L1BzoYY+TZk JpYNO1kQKqyhCvM5v58zMzNZE7ruMhG+G7eVxwUZJ7hfHY85ST/GTnEu+ZLWOebkKZNR xmC912obEaAyOLIzaFg7Ktly2RcidWwNoLH9EALMZZSMaX4Qbxa4VQ2h8BP1YPslEt7d 7lBwfRXgvD7/nMhhPvV/VSHIuuSJlHvF17fX2vosQqn1SKvHUGmqmbU8MXiSCk+RGBYt OFDA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u3si15529598plz.201.2019.07.15.08.00.18; Mon, 15 Jul 2019 08:00:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391427AbfGOO5r (ORCPT + 99 others); Mon, 15 Jul 2019 10:57:47 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:41069 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391187AbfGOO5o (ORCPT ); Mon, 15 Jul 2019 10:57:44 -0400 Received: from orion.localdomain ([95.118.111.244]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MnJdC-1iCEHn0LUC-00jKG5; Mon, 15 Jul 2019 16:57:39 +0200 From: "Enrico Weigelt, metux IT consult" To: linux-kernel@vger.kernel.org Cc: jacek.anaszewski@gmail.com, pavel@ucw.cz, dmurphy@ti.com, linux-leds@vger.kernel.org Subject: [PATCH 2/6] leds: apu: drop enum_apu_led_platform_types Date: Mon, 15 Jul 2019 16:57:29 +0200 Message-Id: <1563202653-20994-3-git-send-email-info@metux.net> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1563202653-20994-1-git-send-email-info@metux.net> References: <1563202653-20994-1-git-send-email-info@metux.net> X-Provags-ID: V03:K1:2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.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Enrico Weigelt As this driver now only supports the APU1 boards, we don't need to differenciate between board types anymore. Therefore optimize away the now obsolete code. Signed-off-by: Enrico Weigelt --- drivers/leds/leds-apu.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/leds/leds-apu.c b/drivers/leds/leds-apu.c index 140093a..37b054f 100644 --- a/drivers/leds/leds-apu.c +++ b/drivers/leds/leds-apu.c @@ -66,16 +66,10 @@ struct apu_led_profile { unsigned long offset; /* for devm_ioremap */ }; -/* Supported platform types */ -enum apu_led_platform_types { - APU1_LED_PLATFORM, -}; - struct apu_led_pdata { struct platform_device *pdev; struct apu_led_priv *pled; const struct apu_led_profile *profile; - enum apu_led_platform_types platform; int num_led_instances; int iosize; /* for devm_ioremap() */ spinlock_t lock; @@ -130,8 +124,7 @@ static int apu_led_config(struct device *dev, struct apu_led_pdata *apuld) led_cdev->brightness = apu_led->profile[i].brightness; led_cdev->max_brightness = 1; led_cdev->flags = LED_CORE_SUSPENDRESUME; - if (apu_led->platform == APU1_LED_PLATFORM) - led_cdev->brightness_set = apu1_led_brightness_set; + led_cdev->brightness_set = apu1_led_brightness_set; pled->param.addr = devm_ioremap(dev, apu_led->profile[i].offset, apu_led->iosize); @@ -144,7 +137,7 @@ static int apu_led_config(struct device *dev, struct apu_led_pdata *apuld) if (err) goto error; - led_cdev->brightness_set(led_cdev, apu_led->profile[i].brightness); + apu1_led_brightness_set(led_cdev, apu_led->profile[i].brightness); } return 0; @@ -166,7 +159,6 @@ static int __init apu_led_probe(struct platform_device *pdev) apu_led->pdev = pdev; apu_led->profile = apu1_led_profile; - apu_led->platform = APU1_LED_PLATFORM; apu_led->num_led_instances = ARRAY_SIZE(apu1_led_profile); apu_led->iosize = APU1_IOSIZE; -- 1.9.1