Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp3991254ioo; Wed, 25 May 2022 12:17:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzPf+QRUM1Dct9Yw8PZdzYu7Lr27UuJTGHaq5kPQOeS8CEzRybpvzHe5UpWxhSo4YEHsV7E X-Received: by 2002:a17:90a:1544:b0:1e0:66c5:4080 with SMTP id y4-20020a17090a154400b001e066c54080mr12055764pja.141.1653506230531; Wed, 25 May 2022 12:17:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653506230; cv=none; d=google.com; s=arc-20160816; b=a0iGxrVVEi12cKUVly113AfQEM1gb3mM1TiWq+IJetKNsUHqMjSVsG6guoFdwyJuq9 97+r8DiMBG4pwnVI5friCj4T6K4kXSuxIHDCRRx4HR9yWsC3aeViaDalNpH9wWsv6U3R EuhseFBU6yYbY56F5p32+Z5HTfNiRkxDX1FgwsWdpXsQhU7piAX/TkyrTUhAhRAFhu/f gYXlqXbm5rgWYb83yPPRXUXwhsChzBxLEcweCCD/YU9XISf0Je3zPh7jDwJITacVFovQ kBt4kEm0j2yFCEmL9fkoLEVwxDVZzUKF0t+M23pWjrdXciPX2p0amkjjSiOKPv9NPBcd BPaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=JyixjUdddf6I90XP9MdFK6+higCWyl5KeV+gVWtp6WU=; b=u+y6gd6WPotqcjcGMGddb+34CO6M2GMmDiOl0ucH47MB6abCXzVXvI1TVjSf7PYXEX YOYree0ZKy2O5yDrFGrw6G2s+yz4wNSNKK69Ed9BA/+c/aSnLNWMuUGsdL2gs2jbOYO3 JiCcjedDL+NwmBfthuX9xVRikJx/EGy5Naxuw7U/8NNxaa4uuekrzgiL87OSSqBEZb3X yiFUFE/aVaOn2431lonxaND+xfuzRRkl0cYfWr7JsbsXiZJMBivO+AZD7t2WEI2lR6Ia CDwSpChOfyctUV/4VAxKa/PrXPWCieSE/Cc8u/y1gkQ13L9pOz0PsC3ITPhZ6JVlTmIA I0wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=f20Va32d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v2-20020a1709029a0200b00162188be343si14303588plp.264.2022.05.25.12.16.58; Wed, 25 May 2022 12:17:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=f20Va32d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245080AbiEYPMR (ORCPT + 99 others); Wed, 25 May 2022 11:12:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245045AbiEYPLv (ORCPT ); Wed, 25 May 2022 11:11:51 -0400 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 828B8B0D17 for ; Wed, 25 May 2022 08:11:43 -0700 (PDT) Received: by mail-pj1-x1029.google.com with SMTP id x2-20020a17090a1f8200b001e07a64c461so1912517pja.4 for ; Wed, 25 May 2022 08:11:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=JyixjUdddf6I90XP9MdFK6+higCWyl5KeV+gVWtp6WU=; b=f20Va32dKRJKc/hg0L61Ym/jpgUK0f5vPl1fJoIrhHp4ZYZ651lh4oqGY4DK+jeg4J j/5F1rr/CFGPSwCgQSnzLJcizT05k7U/pFvaGcJ5lkhZrGqDWv9IscCatZuGe25yR9q2 gcabwG6JEe6AnZbUxaBC1uMGDPQd6VHlNYBrs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=JyixjUdddf6I90XP9MdFK6+higCWyl5KeV+gVWtp6WU=; b=VUoAzKOWsXQo60JEUgJSM7kLR9cY+kg+kswGFQOtikalBXdTl4PP3lsu8GtrWylXsF WvS4Q1FBaNRG8RfmGdm4JeRaeFZyhfNELfYo+z6fdDqH+4CZkVN8HvVGnFbfTsMEsrov ZIvtYiY1hBsNOtXboeRm7ZcIQZt6SYVXqQoAw6Tj0mjxt7/DYajGJ32AFl+EoTbXnnK8 xnnKT3+AzRjRopzI0cEQvg2v7KC+X1JZYoGQ4LaHv4nfqiN8kc4RewBnXhmXQVjirb1z /b+eQPSvBLxooEMA2dkb/szmwXgo3upmx5aYnvoOAociq5Tw3jho6KPyRsb1jVeijZJu sdvQ== X-Gm-Message-State: AOAM530bhWUowF1b5K+SXqrb7xvO4HRZU1sKO5ngui+qqWmv9fFT82qs IENHRFdF65gGqSZuPq+ea0eCPA== X-Received: by 2002:a17:90a:6487:b0:1df:7e0f:c93e with SMTP id h7-20020a17090a648700b001df7e0fc93emr10975351pjj.77.1653491502589; Wed, 25 May 2022 08:11:42 -0700 (PDT) Received: from localhost ([2620:15c:11a:202:4d83:f549:9abd:427]) by smtp.gmail.com with UTF8SMTPSA id a21-20020a637055000000b003c14af505fesm8581222pgn.22.2022.05.25.08.11.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 25 May 2022 08:11:42 -0700 (PDT) Date: Wed, 25 May 2022 08:11:40 -0700 From: Matthias Kaehlcke To: Tzung-Bi Shih Cc: bleung@chromium.org, groeck@chromium.org, robh+dt@kernel.org, chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Guenter Roeck Subject: Re: [PATCH v4 4/5] platform/chrome: cros_kbd_led_backlight: support OF match Message-ID: References: <20220523090822.3035189-1-tzungbi@kernel.org> <20220523090822.3035189-5-tzungbi@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 25, 2022 at 11:33:25AM +0800, Tzung-Bi Shih wrote: > On Tue, May 24, 2022 at 01:08:00PM -0700, Matthias Kaehlcke wrote: > > On Mon, May 23, 2022 at 05:08:21PM +0800, Tzung-Bi Shih wrote: > > > +#ifdef CONFIG_OF > > > +static const struct of_device_id keyboard_led_of_match[] = { > > > + { > > > + .compatible = "google,cros-kbd-led-backlight", > > > + }, > > > + {} > > > +}; > > > +MODULE_DEVICE_TABLE(of, keyboard_led_of_match); > > > +#endif > > > + > > > static struct platform_driver keyboard_led_driver = { > > > .driver = { > > > .name = "chromeos-keyboard-leds", > > > .acpi_match_table = ACPI_PTR(keyboard_led_acpi_match), > > > + .of_match_table = of_match_ptr(keyboard_led_of_match), > > > > You need to put this assignment inside an '#ifdef CONFIG_OF' block, > > otherwise the compiler won't find 'keyboard_led_of_match' when > > CONFIG_OF isn't set. > > It doesn't need as of_match_ptr() already guarded it. I learned something new today :) Reviewed-by: Matthias Kaehlcke