From patchwork Fri Jun 9 12:49:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 9778389 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B064260350 for ; Fri, 9 Jun 2017 12:49:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 984AD284B2 for ; Fri, 9 Jun 2017 12:49:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8A75A28562; Fri, 9 Jun 2017 12:49:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0B75C284B2 for ; Fri, 9 Jun 2017 12:49:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751554AbdFIMtr (ORCPT ); Fri, 9 Jun 2017 08:49:47 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:60786 "EHLO baptiste.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751548AbdFIMtr (ORCPT ); Fri, 9 Jun 2017 08:49:47 -0400 Received: from ayla.of.borg ([84.193.137.253]) by baptiste.telenet-ops.be with bizsmtp id Wcpk1v00j5UCtCs01cpkLT; Fri, 09 Jun 2017 14:49:45 +0200 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.86_2) (envelope-from ) id 1dJJMG-0004Qo-Kd; Fri, 09 Jun 2017 14:49:44 +0200 Received: from geert by ramsan with local (Exim 4.86_2) (envelope-from ) id 1dJJMG-0006L5-J1; Fri, 09 Jun 2017 14:49:44 +0200 From: Geert Uytterhoeven To: Michael Turquette , Stephen Boyd Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH] clk: renesas: cpg-mssr: Use of_device_get_match_data() helper Date: Fri, 9 Jun 2017 14:49:43 +0200 Message-Id: <1497012583-24328-1-git-send-email-geert+renesas@glider.be> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If CONFIG_OF=n: drivers/clk/renesas/renesas-cpg-mssr.c: In function ‘cpg_mssr_probe’: drivers/clk/renesas/renesas-cpg-mssr.c:702: warning: dereferencing ‘void *’ pointer drivers/clk/renesas/renesas-cpg-mssr.c:702: error: request for member ‘data’ in something not a structure or union To fix this, use the of_device_get_match_data() helper, for which a dummy version is provided if CONFIG_OF=n. Signed-off-by: Geert Uytterhoeven --- Feel free to apply directly, as I currently don't have more material for clk-renesas-for-v4.13. drivers/clk/renesas/renesas-cpg-mssr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/renesas/renesas-cpg-mssr.c b/drivers/clk/renesas/renesas-cpg-mssr.c index f44a8125615bd75a..1f607c806f9b9ec3 100644 --- a/drivers/clk/renesas/renesas-cpg-mssr.c +++ b/drivers/clk/renesas/renesas-cpg-mssr.c @@ -699,7 +699,7 @@ static int __init cpg_mssr_probe(struct platform_device *pdev) struct clk **clks; int error; - info = of_match_node(cpg_mssr_match, np)->data; + info = of_device_get_match_data(dev); if (info->init) { error = info->init(dev); if (error)