From patchwork Mon Apr 19 08:17:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12211081 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BB89EC433ED for ; Mon, 19 Apr 2021 08:17:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8E7966113C for ; Mon, 19 Apr 2021 08:17:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232400AbhDSISF (ORCPT ); Mon, 19 Apr 2021 04:18:05 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:50410 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230487AbhDSISD (ORCPT ); Mon, 19 Apr 2021 04:18:03 -0400 Received: from mail-ed1-f72.google.com ([209.85.208.72]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lYP63-0007sh-LF for linux-samsung-soc@vger.kernel.org; Mon, 19 Apr 2021 08:17:31 +0000 Received: by mail-ed1-f72.google.com with SMTP id l7-20020aa7c3070000b029038502ffe9f2so5001921edq.16 for ; Mon, 19 Apr 2021 01:17:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=g3LUGEJmp+br9C+4Vo+YUNsyCt/PXk3aFn54roSqdS8=; b=Ml5vRWmVdARbiwMxaM0X4dC2NQr91jV4Hl8OjMqFZzhab4rmURkuQCXMLjMfXxjXqh gpIXQgON8Y4w4a1hzM+MiGrk3U4K9KgGjFHNZV4Sskuq2+9M2u33MMAssEq70Q+ddPQc 41n4s8QeYzsB33AuE0DHUqT51mKmL7CWMf/JDxjQKBbRMxivGfsg7YXi2UNXeItqKwv2 J3a3umncq/vMYMVA3IPqrGs5OQOMULcnNOjL5BmaaVMg89Hu2ks4No6Yl+XXRjWgMFbA fUrRmt6UeglRvBadFO+tGEQHyrD9SyZvdJMifr3h1v3bfKxVIzPH7MEpgz8Y8O2Qswcr HQRw== X-Gm-Message-State: AOAM533EPMJ7IY5fk+sBZeHwNpTbGMWBYenQPOBB+dOtvLoj5cCRyFhp TDT2gjlUkglSrq/XBtwfaFd0ze4CfO3wFThUZWfIJTpvWSF1TooZXecUqTBkt4Fj74RP8HV1SVs ZDazc1HBWQl4SbgOVostspuLYroCaXcOs9a1bckzmiqKQaTjJ X-Received: by 2002:a17:906:7d82:: with SMTP id v2mr21176586ejo.524.1618820251388; Mon, 19 Apr 2021 01:17:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxy4EtMQXnut0wnOGkwOw0Mdy3TCBQQu/E5EuD6rk7PBrCTRVZtUjf3OIo0bVwGNEkZ4dAKsw== X-Received: by 2002:a17:906:7d82:: with SMTP id v2mr21176578ejo.524.1618820251260; Mon, 19 Apr 2021 01:17:31 -0700 (PDT) Received: from localhost.localdomain (xdsl-188-155-192-147.adslplus.ch. [188.155.192.147]) by smtp.gmail.com with ESMTPSA id da13sm12384781edb.6.2021.04.19.01.17.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 01:17:30 -0700 (PDT) From: Krzysztof Kozlowski To: Support Opensource , Lee Jones , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Tony Lindgren , linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-omap@vger.kernel.org, patches@opensource.cirrus.com Subject: [PATCH 1/7] mfd: max8997: Simplify getting of_device_id match data Date: Mon, 19 Apr 2021 10:17:20 +0200 Message-Id: <20210419081726.67867-1-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Use of_device_get_match_data() to make the code slightly smaller. Signed-off-by: Krzysztof Kozlowski --- drivers/mfd/max8997.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/mfd/max8997.c b/drivers/mfd/max8997.c index 68d8f2b95287..f89b1eb121c9 100644 --- a/drivers/mfd/max8997.c +++ b/drivers/mfd/max8997.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -145,11 +146,9 @@ static struct max8997_platform_data *max8997_i2c_parse_dt_pdata( static inline unsigned long max8997_i2c_get_driver_data(struct i2c_client *i2c, const struct i2c_device_id *id) { - if (IS_ENABLED(CONFIG_OF) && i2c->dev.of_node) { - const struct of_device_id *match; - match = of_match_node(max8997_pmic_dt_match, i2c->dev.of_node); - return (unsigned long)match->data; - } + if (IS_ENABLED(CONFIG_OF) && i2c->dev.of_node) + return (unsigned long)of_device_get_match_data(&i2c->dev); + return id->driver_data; } From patchwork Mon Apr 19 08:17:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12211079 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8A779C433B4 for ; Mon, 19 Apr 2021 08:17:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5CDE261107 for ; Mon, 19 Apr 2021 08:17:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234525AbhDSISF (ORCPT ); Mon, 19 Apr 2021 04:18:05 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:50416 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232400AbhDSISD (ORCPT ); Mon, 19 Apr 2021 04:18:03 -0400 Received: from mail-ed1-f72.google.com ([209.85.208.72]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lYP64-0007tD-Mx for linux-samsung-soc@vger.kernel.org; Mon, 19 Apr 2021 08:17:32 +0000 Received: by mail-ed1-f72.google.com with SMTP id r14-20020a50d68e0000b0290385504d6e4eso829046edi.7 for ; Mon, 19 Apr 2021 01:17:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=52l2YOdVJgJFgazG9TczP/a1+Vn2GICqhmwoQ1rMqI8=; b=gPLOctVOyKH+bVXkIxPfxPWjxx/E4vSqjvbQlDywmwhidwAT4zYRd9rvRx4PAfP5tc TDAt+4K5OrAACAitfFrf9Wg6CXwFLmysnsgYu2Z0Wct8nCTWvht5gEhubcLS529FeNlQ kwrybQfrpyco3lAOfEfW86OvWV7bQC+1foFY2x/zwPOZ5bFBXVibudyu3hz55j9vksib PhJruudPyeClHBExL0KvH9lLiEDiWp8QFN4IBQ6XTF0PvpSHm1PEMIP9VeY/6szrFNox 1WDE4PmNb64U5FuVh7YvHmlPcCdgtz8R0RtPzEDqLzkz+YGGf90gKKOb37x+0O14A/9m 7eCA== X-Gm-Message-State: AOAM531S3Gln+Y/MWKxFpj/ja8iUgAzcD2laEPJKXWTcvUJRwyaMB5/f gbWx+w41OjLZnJuxOv21A+1hCme6WL/SFTilN3LGBvbKdptvqQ/MZhf8BNJuznUsEa7/adO+BdR vQeXS3wranmtvxBIKTNgY75r1s7NkThd5wDIvXshFDIHZz+eD X-Received: by 2002:a17:906:4881:: with SMTP id v1mr1683063ejq.383.1618820252484; Mon, 19 Apr 2021 01:17:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJYZH0QZa+sRVeO2DjuzsgUYgTnfcyHw6NR/d953cZ/+ohVHYxVqiEhAjo9vStCBaYnVmhfw== X-Received: by 2002:a17:906:4881:: with SMTP id v1mr1683050ejq.383.1618820252362; Mon, 19 Apr 2021 01:17:32 -0700 (PDT) Received: from localhost.localdomain (xdsl-188-155-192-147.adslplus.ch. [188.155.192.147]) by smtp.gmail.com with ESMTPSA id da13sm12384781edb.6.2021.04.19.01.17.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 01:17:32 -0700 (PDT) From: Krzysztof Kozlowski To: Support Opensource , Lee Jones , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Tony Lindgren , linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-omap@vger.kernel.org, patches@opensource.cirrus.com Subject: [PATCH 2/7] mfd: max8998: Simplify getting of_device_id match data Date: Mon, 19 Apr 2021 10:17:21 +0200 Message-Id: <20210419081726.67867-2-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210419081726.67867-1-krzysztof.kozlowski@canonical.com> References: <20210419081726.67867-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Use of_device_get_match_data() to make the code slightly smaller. Signed-off-by: Krzysztof Kozlowski --- drivers/mfd/max8998.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/mfd/max8998.c b/drivers/mfd/max8998.c index 785f8e9841b7..42c60d4d97fb 100644 --- a/drivers/mfd/max8998.c +++ b/drivers/mfd/max8998.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -155,11 +156,8 @@ static struct max8998_platform_data *max8998_i2c_parse_dt_pdata( static inline unsigned long max8998_i2c_get_driver_data(struct i2c_client *i2c, const struct i2c_device_id *id) { - if (IS_ENABLED(CONFIG_OF) && i2c->dev.of_node) { - const struct of_device_id *match; - match = of_match_node(max8998_dt_match, i2c->dev.of_node); - return (unsigned long)match->data; - } + if (IS_ENABLED(CONFIG_OF) && i2c->dev.of_node) + return (unsigned long)of_device_get_match_data(&i2c->dev); return id->driver_data; } From patchwork Mon Apr 19 08:17:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12211083 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 815B6C43462 for ; Mon, 19 Apr 2021 08:17:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 61EB96101C for ; Mon, 19 Apr 2021 08:17:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236037AbhDSISG (ORCPT ); Mon, 19 Apr 2021 04:18:06 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:50432 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233488AbhDSISE (ORCPT ); Mon, 19 Apr 2021 04:18:04 -0400 Received: from mail-ej1-f71.google.com ([209.85.218.71]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lYP65-0007tv-Sd for linux-samsung-soc@vger.kernel.org; Mon, 19 Apr 2021 08:17:34 +0000 Received: by mail-ej1-f71.google.com with SMTP id w2-20020a1709062f82b0290378745f26d5so3332196eji.6 for ; Mon, 19 Apr 2021 01:17:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qBlSlGEgsRYkWadTEY1QTDX93GegaXkwf2V4Jg/WsDg=; b=Mr6XcHo0rRN8UK4+wVfYTAfja6jPtM3BLf2n6rBpLl8C+4gg+8cpPukRiuY+ikn8cQ DF0lwL/H9NHcnh0WnGYJRMeIwrJOHUrdxI5QRXVM4OXleSTTEV6/Z+FFy8DDB2nfYMjn 3QByej1d5CRTTcbVm9YOQzwdM14tw5kLyckBvoM7kaaXXCnn4e+SsgL31OBfCG+kbyTH KFp83GAE0HBuL2JvoI4xbvG0OlV6BPbTVBAqJJrXpDOQUYOAQvfEqjpGT9aGJ6MWCbYR TAhAsJdXKuqkpISZP91m+uQyOVLH+yJYaZQIntfH40PybEkwHdeEblKpqUQAAURa3Y9T caNg== X-Gm-Message-State: AOAM532y+ld+43vyJQJphNblaUj3wBaCwonErOsCx4yd3flUJMetHMkg 1mTjrSIKfNEUC+8vxjQOiXbNn8pQmCFkU4RgaYl1MUeCpk37GOczxxoHbLF28N3YqTNwwAzbfow +pxpNXNqTBESNZmv0KCu0LbVZ2FPvORlS15g6EOoYamtzBtmm X-Received: by 2002:a17:906:5e15:: with SMTP id n21mr20554432eju.57.1618820253487; Mon, 19 Apr 2021 01:17:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzg+swdgj8EuewfKecTej+k1qH/AS1lZ95oqPWPHenRPBZ4PUCtQ7xGMn+3SRt0O+PhuF3UZw== X-Received: by 2002:a17:906:5e15:: with SMTP id n21mr20554419eju.57.1618820253361; Mon, 19 Apr 2021 01:17:33 -0700 (PDT) Received: from localhost.localdomain (xdsl-188-155-192-147.adslplus.ch. [188.155.192.147]) by smtp.gmail.com with ESMTPSA id da13sm12384781edb.6.2021.04.19.01.17.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 01:17:33 -0700 (PDT) From: Krzysztof Kozlowski To: Support Opensource , Lee Jones , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Tony Lindgren , linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-omap@vger.kernel.org, patches@opensource.cirrus.com Subject: [PATCH 3/7] mfd: da9052: Simplify getting of_device_id match data Date: Mon, 19 Apr 2021 10:17:22 +0200 Message-Id: <20210419081726.67867-3-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210419081726.67867-1-krzysztof.kozlowski@canonical.com> References: <20210419081726.67867-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Use of_device_get_match_data() to make the code slightly smaller. Signed-off-by: Krzysztof Kozlowski Acked-by: Adam Thomson --- drivers/mfd/da9052-i2c.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/mfd/da9052-i2c.c b/drivers/mfd/da9052-i2c.c index 47556d2d9abe..5d8ce8dca3fc 100644 --- a/drivers/mfd/da9052-i2c.c +++ b/drivers/mfd/da9052-i2c.c @@ -154,13 +154,8 @@ static int da9052_i2c_probe(struct i2c_client *client, return ret; #ifdef CONFIG_OF - if (!id) { - struct device_node *np = client->dev.of_node; - const struct of_device_id *deviceid; - - deviceid = of_match_node(dialog_dt_ids, np); - id = deviceid->data; - } + if (!id) + id = of_device_get_match_data(&client->dev); #endif if (!id) { From patchwork Mon Apr 19 08:17:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12211087 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 59A2AC4360C for ; Mon, 19 Apr 2021 08:17:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3D0C561107 for ; Mon, 19 Apr 2021 08:17:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234668AbhDSISI (ORCPT ); Mon, 19 Apr 2021 04:18:08 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:50441 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233770AbhDSISF (ORCPT ); Mon, 19 Apr 2021 04:18:05 -0400 Received: from mail-ed1-f70.google.com ([209.85.208.70]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lYP66-0007uX-TE for linux-samsung-soc@vger.kernel.org; Mon, 19 Apr 2021 08:17:34 +0000 Received: by mail-ed1-f70.google.com with SMTP id t11-20020aa7d4cb0000b0290382e868be07so10750586edr.20 for ; Mon, 19 Apr 2021 01:17:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rLN0PMvVAHq0LojAhsPhZSWrezfhIp/EDYrzGUmyMJA=; b=WRnlZOMMPSn5aQXLGNfLE1SyuznFZImjVyklr83nsO5cccPq1EKzP9LR5NtWoos3lV rI2XdFPc5c6fDKwm4yGOuAPOa2PjmhXT3y5ic6zwBLmZRCz4u+Eh35f8HHj9t/ckXv/7 j3K4rgN6sZqx1PQMgxyK3/9BDQkswT1nJYYI7YSYuWngznI4DZltL9TW3dbduvOLzJRV 2ruZPOSEqvKDyY1/+f4O/cnwvJNYrmaxk3mySsF/N9T5u5gbChS48PoHqV5dnACTNJAn bInwzjaUAeAmcAbn5mdZnSWB4xj4wtJ+lYMhS6HA1NKpIXeXPF9M6IKr9OPKUOLaqTDd 2bHw== X-Gm-Message-State: AOAM533ASNB7bOQd2ml3ejzckfs6WPas1NxvYG/AGcKQFfypzQKynG1H RFrldW61XdNJwvAiemqZeSFoSdeQ7NYgQ8wWFVDTADV2VuhD3bITTT9WmHqZWraST7BREMKrPDB FFiuw+WF1Eq/sVP3VjPLVbNhaZfzdWx7yc1XxeT3fGniFBhlp X-Received: by 2002:aa7:d7d1:: with SMTP id e17mr24637984eds.84.1618820254499; Mon, 19 Apr 2021 01:17:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbgbYVj51767PEhDP7VAodeawbzJhcMg0iaGYdt1vBRijmX7LpaevyW3LVDSs2NNzeY/besg== X-Received: by 2002:aa7:d7d1:: with SMTP id e17mr24637973eds.84.1618820254403; Mon, 19 Apr 2021 01:17:34 -0700 (PDT) Received: from localhost.localdomain (xdsl-188-155-192-147.adslplus.ch. [188.155.192.147]) by smtp.gmail.com with ESMTPSA id da13sm12384781edb.6.2021.04.19.01.17.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 01:17:34 -0700 (PDT) From: Krzysztof Kozlowski To: Support Opensource , Lee Jones , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Tony Lindgren , linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-omap@vger.kernel.org, patches@opensource.cirrus.com Subject: [PATCH 4/7] mfd: da9052: Simplify getting of_device_id match data Date: Mon, 19 Apr 2021 10:17:23 +0200 Message-Id: <20210419081726.67867-4-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210419081726.67867-1-krzysztof.kozlowski@canonical.com> References: <20210419081726.67867-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Use of_device_get_match_data() to make the code slightly smaller. Signed-off-by: Krzysztof Kozlowski Acked-by: Adam Thomson --- drivers/mfd/da9062-core.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/mfd/da9062-core.c b/drivers/mfd/da9062-core.c index 8d913375152d..01f8e10dfa55 100644 --- a/drivers/mfd/da9062-core.c +++ b/drivers/mfd/da9062-core.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -622,7 +623,6 @@ static int da9062_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *id) { struct da9062 *chip; - const struct of_device_id *match; unsigned int irq_base; const struct mfd_cell *cell; const struct regmap_irq_chip *irq_chip; @@ -635,15 +635,10 @@ static int da9062_i2c_probe(struct i2c_client *i2c, if (!chip) return -ENOMEM; - if (i2c->dev.of_node) { - match = of_match_node(da9062_dt_ids, i2c->dev.of_node); - if (!match) - return -EINVAL; - - chip->chip_type = (uintptr_t)match->data; - } else { + if (i2c->dev.of_node) + chip->chip_type = (uintptr_t)of_device_get_match_data(&i2c->dev); + else chip->chip_type = id->driver_data; - } i2c_set_clientdata(i2c, chip); chip->dev = &i2c->dev; From patchwork Mon Apr 19 08:17:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12211085 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 20737C43460 for ; Mon, 19 Apr 2021 08:17:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E389561107 for ; Mon, 19 Apr 2021 08:17:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236871AbhDSISH (ORCPT ); Mon, 19 Apr 2021 04:18:07 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:50447 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234668AbhDSISG (ORCPT ); Mon, 19 Apr 2021 04:18:06 -0400 Received: from mail-ej1-f72.google.com ([209.85.218.72]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lYP67-0007v6-R9 for linux-samsung-soc@vger.kernel.org; Mon, 19 Apr 2021 08:17:35 +0000 Received: by mail-ej1-f72.google.com with SMTP id k5-20020a1709061c05b029037cb8a99e03so3341878ejg.16 for ; Mon, 19 Apr 2021 01:17:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tc7UDOgzQIAykIaB+pmrJMasrN1QkIFHd3HQXapxUk8=; b=b9aL/nKKZCDzqqIZXODOlmTkkauHJwmNLh6lgv6KUvoXlfAr0h/Ro1fSk2i8bdYS7Q +hO7xjXC/asKBXE2CDgDmYZgzSgoiHXLFnUUMvTRey4F9860Z/shncFgQ75paLALOB7P UIm41XypNJVjkmeAI/mZwzvGV3WkgXPfpXoseYwrkOooryghx3W5if2VnuRJFR2qAtqH Vei1ZjQCaAu6/uHSYriC5gnNN7cdUUNS9swqjFCzyLzC+N47NjCqos18UjATmDIhLcI/ hzr9baQtZzW35ZoTOHnDsjeyvn2UIRPUwMQ6g1qZRVe7Mf9YdrboBq4KLdtBUT4ZkyKM BNTQ== X-Gm-Message-State: AOAM533GemTg3sLu/qWkw91TjnZOt/4kOV3ZUVPSHvsa9Al35bE1kQ+Z fQcqNAONUq9Ol+YJEcV738RhV2IP+cKvRf64UN3UOOdrmoZKUF4ixdyrHLpm1kybTfjK1i51e2I ZJGYYzylqTzkM46Y+4LMEMq6wHR/35cGZSimw888aOfwevxG+ X-Received: by 2002:a17:906:b355:: with SMTP id cd21mr20275791ejb.504.1618820255600; Mon, 19 Apr 2021 01:17:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzuNTd9ZhGvDTg10FMK/NZMBEOBVAcdqe+s6V+fPsy8k7y7PvbXCS1lhxfXbnNILmmvl5bcsA== X-Received: by 2002:a17:906:b355:: with SMTP id cd21mr20275768ejb.504.1618820255421; Mon, 19 Apr 2021 01:17:35 -0700 (PDT) Received: from localhost.localdomain (xdsl-188-155-192-147.adslplus.ch. [188.155.192.147]) by smtp.gmail.com with ESMTPSA id da13sm12384781edb.6.2021.04.19.01.17.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 01:17:35 -0700 (PDT) From: Krzysztof Kozlowski To: Support Opensource , Lee Jones , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Tony Lindgren , linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-omap@vger.kernel.org, patches@opensource.cirrus.com Subject: [PATCH 5/7] mfd: sec: Simplify getting of_device_id match data Date: Mon, 19 Apr 2021 10:17:24 +0200 Message-Id: <20210419081726.67867-5-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210419081726.67867-1-krzysztof.kozlowski@canonical.com> References: <20210419081726.67867-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Use of_device_get_match_data() to make the code slightly smaller. Signed-off-by: Krzysztof Kozlowski --- drivers/mfd/sec-core.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c index 8d55992da19e..3126c39f3203 100644 --- a/drivers/mfd/sec-core.c +++ b/drivers/mfd/sec-core.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -324,12 +325,8 @@ static inline unsigned long sec_i2c_get_driver_data(struct i2c_client *i2c, const struct i2c_device_id *id) { #ifdef CONFIG_OF - if (i2c->dev.of_node) { - const struct of_device_id *match; - - match = of_match_node(sec_dt_match, i2c->dev.of_node); - return (unsigned long)match->data; - } + if (i2c->dev.of_node) + return (unsigned long)of_device_get_match_data(&i2c->dev); #endif return id->driver_data; } From patchwork Mon Apr 19 08:17:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12211089 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ECAACC43460 for ; Mon, 19 Apr 2021 08:17:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CF1346113C for ; Mon, 19 Apr 2021 08:17:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237906AbhDSISL (ORCPT ); Mon, 19 Apr 2021 04:18:11 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:50457 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235758AbhDSISH (ORCPT ); Mon, 19 Apr 2021 04:18:07 -0400 Received: from mail-ej1-f71.google.com ([209.85.218.71]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lYP68-0007vg-QV for linux-samsung-soc@vger.kernel.org; Mon, 19 Apr 2021 08:17:36 +0000 Received: by mail-ej1-f71.google.com with SMTP id c18-20020a17090603d2b029037c77ad778eso3349062eja.1 for ; Mon, 19 Apr 2021 01:17:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UpAJNzbD9MKVQi14LfzEiS6XF3kyB2Fc0GZ6ydruDWw=; b=BCu30RifBR+3AUaSh6SqCFauWT/11iG2IKFsNlY8QnF3El+C4Hldxh3dWR6Qzibgwd u7k5toaxLO/I/8W7Y3F+JgBgyP1Oy5ybxkmlRr9UjZFmSMn3abnEj0/ycNMlu6RIWo95 DqMDgFmNpU4SAGYrgY/E5dl91AuR0nT+No1BwCj2ie8s+r/1EQhbhqwXJPfymzl32Fi2 us//ORzP2knN1r1yGjpwXrZAvTr+ihAawVOV3jefsKpJiRPcTSEapewldl5oX33A6c9d Gcfy7zWBsmYZsUiNFwWVd3/mksbzZL9RAF1NZEd0DayTe5A33CVcYD0VNbOEX/mjeJys gjvg== X-Gm-Message-State: AOAM533TxADGUx7L4bSNy94eA+zfdEm1dbMlQXuO+DxOWY2lhuUXFOrR 6Nzvpu0U51xDbUvctor+CN4gRmqadhuJm3XuGBmIqyA/m/QwTMw9MkqjlbTaKZ0RfnG+XrVshdA QceNSU5TWnbKr0+ftMR7nMHeEUDp4P2BKFnkv0CtzjHvASFV+ X-Received: by 2002:aa7:cd83:: with SMTP id x3mr23871126edv.373.1618820256546; Mon, 19 Apr 2021 01:17:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwrRRvmlGCkxx4tXzhKQpNcCtZtp5i5u5JPY0gywyHuqwKmdgiNtXRNYyjndMc/zdrzzTv4fQ== X-Received: by 2002:aa7:cd83:: with SMTP id x3mr23871118edv.373.1618820256448; Mon, 19 Apr 2021 01:17:36 -0700 (PDT) Received: from localhost.localdomain (xdsl-188-155-192-147.adslplus.ch. [188.155.192.147]) by smtp.gmail.com with ESMTPSA id da13sm12384781edb.6.2021.04.19.01.17.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 01:17:36 -0700 (PDT) From: Krzysztof Kozlowski To: Support Opensource , Lee Jones , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Tony Lindgren , linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-omap@vger.kernel.org, patches@opensource.cirrus.com Subject: [PATCH 6/7] mfd: wm831x: Correct kerneldoc Date: Mon, 19 Apr 2021 10:17:25 +0200 Message-Id: <20210419081726.67867-6-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210419081726.67867-1-krzysztof.kozlowski@canonical.com> References: <20210419081726.67867-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Correct kerneldoc function name to fix W=1 warning: drivers/mfd/wm831x-core.c:121: warning: expecting prototype for wm831x_reg_unlock(). Prototype was for wm831x_reg_lock() instead Signed-off-by: Krzysztof Kozlowski Acked-by: Charles Keepax --- drivers/mfd/wm831x-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/wm831x-core.c b/drivers/mfd/wm831x-core.c index bcef08f58fb3..c31809b17547 100644 --- a/drivers/mfd/wm831x-core.c +++ b/drivers/mfd/wm831x-core.c @@ -109,7 +109,7 @@ static int wm831x_reg_locked(struct wm831x *wm831x, unsigned short reg) } /** - * wm831x_reg_unlock: Unlock user keyed registers + * wm831x_reg_lock: Unlock user keyed registers * * The WM831x has a user key preventing writes to particularly * critical registers. This function locks those registers, From patchwork Mon Apr 19 08:17:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12211091 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4538AC433ED for ; Mon, 19 Apr 2021 08:17:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2C90D61107 for ; Mon, 19 Apr 2021 08:17:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238002AbhDSISM (ORCPT ); Mon, 19 Apr 2021 04:18:12 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:50466 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236706AbhDSISI (ORCPT ); Mon, 19 Apr 2021 04:18:08 -0400 Received: from mail-ed1-f70.google.com ([209.85.208.70]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lYP69-0007wE-SM for linux-samsung-soc@vger.kernel.org; Mon, 19 Apr 2021 08:17:37 +0000 Received: by mail-ed1-f70.google.com with SMTP id w14-20020aa7da4e0000b02903834aeed684so9002904eds.13 for ; Mon, 19 Apr 2021 01:17:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xk3WBnA32t2m4Myce9cZ0YQ9ZIjnwr2MU+dccRhDaEQ=; b=iGdJXPvcv8OrkLPj0soejm3oL/tTG9wDEGy5RTOitN27OvyU3M0Jf/QCF/wXkR50Z2 tEq2NdrvlwMpsz9f3hzThgFImd1nB4AgoBKrigwobToVDdgzZMoYC9H/jaOUlTdvGeSs IYpqpJkykFpQ/grl4IYuq9oR5rVBrfz3Zkphn/KcHRx8dRW8YxiVYw/fy9CElnpSTF25 6XT2tWPNCxdDoMJY2Njptw+KOa9PT6XvYq7bt1L23dkQ12Gv5CF8gcQE4WJBqikUONHy 3V89DkExdD/3/YDtKQJXK/5eTSHndiq34lNh5tQnX0DGIzR/CwcmD5zg68iS8gP0h+2d J9uA== X-Gm-Message-State: AOAM532AFBYMLKGWeOf8ndopTVJJX89EfXQCK7epm+QBpbmLZilh0Jyf 5+zriewEFAC4ZzpkREy6MxdTdOOqneVWsGdqqsh3GZM8d4ORom6BlgiRnz7aX8RHR7ngh02FVwi ANhRONs6fY+XJEUgyHuswQpCFG7RmuVKzHJmAHerww7N3MhOv X-Received: by 2002:aa7:c78a:: with SMTP id n10mr16235094eds.239.1618820257638; Mon, 19 Apr 2021 01:17:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEC1eWVQTu9LMVgr/ILKMxwUXo5jz/WdoxqL0Yi4g29Y+yv0xfxfv1+lWwr2RseWz0zqylAQ== X-Received: by 2002:aa7:c78a:: with SMTP id n10mr16235083eds.239.1618820257512; Mon, 19 Apr 2021 01:17:37 -0700 (PDT) Received: from localhost.localdomain (xdsl-188-155-192-147.adslplus.ch. [188.155.192.147]) by smtp.gmail.com with ESMTPSA id da13sm12384781edb.6.2021.04.19.01.17.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 01:17:37 -0700 (PDT) From: Krzysztof Kozlowski To: Support Opensource , Lee Jones , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Tony Lindgren , linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-omap@vger.kernel.org, patches@opensource.cirrus.com Subject: [PATCH 7/7] mfd: twl: Correct kerneldoc Date: Mon, 19 Apr 2021 10:17:26 +0200 Message-Id: <20210419081726.67867-7-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210419081726.67867-1-krzysztof.kozlowski@canonical.com> References: <20210419081726.67867-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Correct kerneldoc function name to fix W=1 warning: drivers/mfd/twl-core.c:496: warning: expecting prototype for twl_regcache_bypass(). Prototype was for twl_set_regcache_bypass() instead Signed-off-by: Krzysztof Kozlowski --- drivers/mfd/twl-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c index 20cf8cfe4f3b..24b77b18b725 100644 --- a/drivers/mfd/twl-core.c +++ b/drivers/mfd/twl-core.c @@ -485,8 +485,8 @@ int twl_i2c_read(u8 mod_no, u8 *value, u8 reg, unsigned num_bytes) EXPORT_SYMBOL(twl_i2c_read); /** - * twl_regcache_bypass - Configure the regcache bypass for the regmap associated - * with the module + * twl_set_regcache_bypass - Configure the regcache bypass for the regmap + * associated with the module * @mod_no: module number * @enable: Regcache bypass state *