From patchwork Sun Oct 29 21:20:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 117421 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp1853735qgn; Sun, 29 Oct 2017 14:24:38 -0700 (PDT) X-Google-Smtp-Source: ABhQp+RCDaAeccUUs68kTFV3PBxvRg/mwgx7fKa471pAGaNhJs6Z26J3QqIVD4C46HzQaMw16Qcx X-Received: by 10.101.98.72 with SMTP id q8mr1540190pgv.71.1509312278379; Sun, 29 Oct 2017 14:24:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509312278; cv=none; d=google.com; s=arc-20160816; b=uNMUK84Zj2C/3qcACkV1A6xgesdi+n7ISQp0x6rZEUh25PIPet9FDz0Ic623DgZxlk y0w2sxcMqec8oQB21RBQNQs8jRgQ+2PabmJm4YJxkxTlbpGvQH4iaUOp4fXEgKDkBkrs 77lacvAffNO4Pvv+l4ZEvKVwmwsM08DmO9ZPjD/14mJSIQVCBwPIRdc+DnnUp2JTKqHn pcED6Ea2Gz4DxDxDuXn/UfEgNc3bLl5aO4zrF2PgQhcLHZI58kKvIX7wpPK3maWjr76E JS0+i1v+1FndpohqOaU6Fo0yw4cDOjDvN5sOV7wIaOctuQccVS1x7QrX1H5Lp0oOPJew Qb5A== 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:dkim-signature:arc-authentication-results; bh=L9Hu0654CMjT1ngDV9FWDQUosHOEZKS1YmNueySOUOg=; b=dkNZlrqTGDqjOcXcEVBCLoW5AYeszRwg7qHfUreY1ssrMx0aE0NoOZqeirUTrOJ7kM Wl69vEqJfbuNQR0QhGGTG46vaRQXt8vwoCHMZJx0RC2VQX57fAGxaZUCJnbPY7Q0TZ+L a+JEo9FACjE5EnfGZ5sDq5xGsWNGzwb4z75YYZeGdHWC+qlTK/CCUIGFDOUGf0DCty5a Tyo4CnIhEYtd5aIsfMYPfFnkhvlji11Mm3SIFdGumIfTRQbDQZy2SLcRs8dCjOyDA6yJ 3/SmSN+vj0xMDiKTB1QJtccvqF8E25ksEnV9619iM626RBIYEqR1RvMf32zMTCusXjRf xxEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DPuJCt2a; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j124si8618242pgc.216.2017.10.29.14.24.38; Sun, 29 Oct 2017 14:24:38 -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; dkim=pass header.i=@linaro.org header.s=google header.b=DPuJCt2a; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932308AbdJ2VYf (ORCPT + 27 others); Sun, 29 Oct 2017 17:24:35 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:50350 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932242AbdJ2VYa (ORCPT ); Sun, 29 Oct 2017 17:24:30 -0400 Received: by mail-wm0-f65.google.com with SMTP id s66so12091514wmf.5 for ; Sun, 29 Oct 2017 14:24:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=L9Hu0654CMjT1ngDV9FWDQUosHOEZKS1YmNueySOUOg=; b=DPuJCt2aEeC9Og61HG8R3K1MtwEf0Yxj5KKmDXtIcc0NmTrHlVxZ/7hicF4L6L9AKo JRMtrqiVqEjyKxr/Eguex3dUbYTOBNEB6JYo0RS071N/6EPXZ3lcLPtD3mrTooB5LyGR vKYeVRNqQ6/aQf68xZrf7z5pWeQ5V8wSTNLLI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=L9Hu0654CMjT1ngDV9FWDQUosHOEZKS1YmNueySOUOg=; b=cuaQnKGeRrQMgtfQXjodh2szqBCqQD4GT3ujvFIH870sAfEN9ZFCFKTtU2Nlo49rGG lue1mhNKjlig5cfP2sIVScXethNbNQ8rGszoQOv7255WPTO1nztdPr6N1v4B7LkfVDgZ Yng6IfBF6bzUU5q+OxyBeO9SuaRb2m55jcKVZBAYWpbUmAVZKkPNKZboeigQ7nYs80/p q4hvgPgOjaBe3iyAbMtfZXnsQ5uiS8qxnT7DHgyq1V5Eo/oO4bdygxkDBeI8SPor5He1 1FXnoA0pBtn7myQmqZtZchQDlV4Tt/gdPZedJqvLqZS4lSAb43E4fPUaLNpw7OUERaSg yawA== X-Gm-Message-State: AMCzsaWcxipy1fu35pEgcsUwiil2690seKd5O4JMNwFnZpHqvL0YD2QW wxV/s4voygwSsvsjXPtVkeV1/g== X-Received: by 10.28.199.4 with SMTP id x4mr1850814wmf.124.1509312268888; Sun, 29 Oct 2017 14:24:28 -0700 (PDT) Received: from localhost.localdomain ([2a01:e35:879a:6cd0:2c92:b7e6:9f71:ab86]) by smtp.gmail.com with ESMTPSA id z20sm10067264wrz.62.2017.10.29.14.24.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 29 Oct 2017 14:24:28 -0700 (PDT) From: Daniel Lezcano To: tglx@linutronix.de, daniel.lezcano@linaro.org Cc: linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 07/17] clocksource/drivers/sh_cmt: Use of_device_get_match_data() helper Date: Sun, 29 Oct 2017 22:20:24 +0100 Message-Id: <1509312035-17368-7-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509312035-17368-1-git-send-email-daniel.lezcano@linaro.org> References: <1509312035-17368-1-git-send-email-daniel.lezcano@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Geert Uytterhoeven Use the existing of_device_get_match_data() helper instead of open-coding its functionality. Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart Signed-off-by: Daniel Lezcano --- drivers/clocksource/sh_cmt.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) -- 2.7.4 diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c index 89c514c..70b3cf8 100644 --- a/drivers/clocksource/sh_cmt.c +++ b/drivers/clocksource/sh_cmt.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -956,10 +957,7 @@ static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev) raw_spin_lock_init(&cmt->lock); if (IS_ENABLED(CONFIG_OF) && pdev->dev.of_node) { - const struct of_device_id *id; - - id = of_match_node(sh_cmt_of_table, pdev->dev.of_node); - cmt->info = id->data; + cmt->info = of_device_get_match_data(&pdev->dev); cmt->hw_channels = cmt->info->channels_mask; } else if (pdev->dev.platform_data) { struct sh_timer_config *cfg = pdev->dev.platform_data;