From patchwork Mon Jun 5 15:57:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 771309 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3whKGZ3r7Cz9s0m for ; Tue, 6 Jun 2017 01:57:58 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="BYB4uyTc"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751188AbdFEP5w (ORCPT ); Mon, 5 Jun 2017 11:57:52 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:32974 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751077AbdFEP5v (ORCPT ); Mon, 5 Jun 2017 11:57:51 -0400 Received: by mail-wr0-f194.google.com with SMTP id v104so7873297wrb.0 for ; Mon, 05 Jun 2017 08:57:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=In52zgDAzYP2xcTlkhqR9YwZjUqljhIaaA4EGuljFwo=; b=BYB4uyTc51bd5q1jYI0V1BM7VD+BF/mSypdlBtvbiKsKgv1Be2PXTc7Rhn9t9b8Vfu X/5cpX50tTJXQp/wBMoCeXGsyOhEj7fCrNmM2fOSed7MakWz4Hl1i+9IyKWvN0qiRQYG Pcfv0S6nPbJ//GSi1WvCkELbccOcyKuwBbhh5JQG2m7FJbDNkQC5LWnlKueYVl7tLJfE SKfInxfouUqM4+AdgeWJjUE+KjsjuRPci6YADuGkxgxWgvx1TYm6Bluy5XtxMYg+upqT P1csX3v5crPHHtHzuNnITyMZTDzm6ZQ32pM6K0EtLP3wAgJXl5vmGkhV0Z9faaM1gSRl IXug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=In52zgDAzYP2xcTlkhqR9YwZjUqljhIaaA4EGuljFwo=; b=LonCtaR2CKl3sSn6JgftOoSdJTL7dkRErRQwS7y/W9l55vhSkxgcpEX8j4cxERT7lr IphRuy7S1e2V0CAuLBha240OdeOxdWBjsWaPRrhxhfQKVbZ/kha8994KpPYJayF58YmH PezhrmGTmMgllTW1WkjNZvJUrAYcWzXGzspXwsrs3uJ8F0cWTNjlG/SSpUhFTrbHGqeB 48OyUjr8yL1mfWriBYqadqYc1wrKwJw7ytMaaVsANPcNUix7GfwTjc7BURVwYOLKiGFZ nH1/JrPxPLVU7RfsZECK2UqZP5xZvRMfV8XtYTzBMkVnNBdjhl0NnhVd+lyG2EmPJMXS E5pw== X-Gm-Message-State: AODbwcA0ks2cgERb33a+xAL+Z6kV374oUfOywz6o8rlDPe3OnDtXx7XO O/be2NtCk5dE0beS X-Received: by 10.223.164.23 with SMTP id d23mr14613584wra.54.1496678270059; Mon, 05 Jun 2017 08:57:50 -0700 (PDT) Received: from ?IPv6:2003:c6:ebdd:1100:2db5:8b57:1b5a:9b07? (p200300C6EBDD11002DB58B571B5A9B07.dip0.t-ipconnect.de. [2003:c6:ebdd:1100:2db5:8b57:1b5a:9b07]) by smtp.googlemail.com with ESMTPSA id q77sm9776642wmd.31.2017.06.05.08.57.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Jun 2017 08:57:49 -0700 (PDT) From: Heiner Kallweit Subject: [PATCH v3 1/4] rtc: ds1307: make definition of ds1307_of_match more compact To: Alexandre Belloni Cc: linux-rtc@vger.kernel.org References: Message-ID: <5b8af62b-24a4-0a05-26c7-6be893297f9c@gmail.com> Date: Mon, 5 Jun 2017 17:57:22 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Sender: linux-rtc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rtc@vger.kernel.org Make the definition of ds1307_of_match more compact. This makes the code better readable and more in line with the definition of ds1307_id and ds1307_acpi_ids. Signed-off-by: Heiner Kallweit Reviewed-by: Linus Walleij --- v2: - no changes v3: - add reviewed-by --- drivers/rtc/rtc-ds1307.c | 70 ++++++++++-------------------------------------- 1 file changed, 14 insertions(+), 56 deletions(-) diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c index a2649385..b960ec3f 100644 --- a/drivers/rtc/rtc-ds1307.c +++ b/drivers/rtc/rtc-ds1307.c @@ -198,62 +198,20 @@ MODULE_DEVICE_TABLE(i2c, ds1307_id); #ifdef CONFIG_OF static const struct of_device_id ds1307_of_match[] = { - { - .compatible = "dallas,ds1307", - .data = (void *)ds_1307 - }, - { - .compatible = "dallas,ds1337", - .data = (void *)ds_1337 - }, - { - .compatible = "dallas,ds1338", - .data = (void *)ds_1338 - }, - { - .compatible = "dallas,ds1339", - .data = (void *)ds_1339 - }, - { - .compatible = "dallas,ds1388", - .data = (void *)ds_1388 - }, - { - .compatible = "dallas,ds1340", - .data = (void *)ds_1340 - }, - { - .compatible = "maxim,ds3231", - .data = (void *)ds_3231 - }, - { - .compatible = "st,m41t0", - .data = (void *)m41t00 - }, - { - .compatible = "st,m41t00", - .data = (void *)m41t00 - }, - { - .compatible = "microchip,mcp7940x", - .data = (void *)mcp794xx - }, - { - .compatible = "microchip,mcp7941x", - .data = (void *)mcp794xx - }, - { - .compatible = "pericom,pt7c4338", - .data = (void *)ds_1307 - }, - { - .compatible = "epson,rx8025", - .data = (void *)rx_8025 - }, - { - .compatible = "isil,isl12057", - .data = (void *)ds_1337 - }, + { .compatible = "dallas,ds1307", .data = (void *)ds_1307 }, + { .compatible = "dallas,ds1337", .data = (void *)ds_1337 }, + { .compatible = "dallas,ds1338", .data = (void *)ds_1338 }, + { .compatible = "dallas,ds1339", .data = (void *)ds_1339 }, + { .compatible = "dallas,ds1388", .data = (void *)ds_1388 }, + { .compatible = "dallas,ds1340", .data = (void *)ds_1340 }, + { .compatible = "maxim,ds3231", .data = (void *)ds_3231 }, + { .compatible = "st,m41t0", .data = (void *)m41t00 }, + { .compatible = "st,m41t00", .data = (void *)m41t00 }, + { .compatible = "microchip,mcp7940x", .data = (void *)mcp794xx }, + { .compatible = "microchip,mcp7941x", .data = (void *)mcp794xx }, + { .compatible = "pericom,pt7c4338", .data = (void *)ds_1307 }, + { .compatible = "epson,rx8025", .data = (void *)rx_8025 }, + { .compatible = "isil,isl12057", .data = (void *)ds_1337 }, { } }; MODULE_DEVICE_TABLE(of, ds1307_of_match);