Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6814480imu; Mon, 3 Dec 2018 03:19:54 -0800 (PST) X-Google-Smtp-Source: AFSGD/XQW9mVDWIKsH/uzQ0Agq76gkv9BuLiczPNJ14/xTIA9PvDrcUmhW8vC+3NLTWdop9NT3x6 X-Received: by 2002:a63:8e43:: with SMTP id k64mr12869128pge.346.1543835994589; Mon, 03 Dec 2018 03:19:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543835994; cv=none; d=google.com; s=arc-20160816; b=mfBNp6o7hMYuwFCWoBZ/PX6XTJfnTTYHy8Iw3nLJaFUBq2Vgk10HENPPdE58KhOxLU h9bTPnXb2zG10LPF1TJDDNeBQN60bjh8YbCHC+FTEJcDZMPNWPtqDcF6G68T8OMmb45q eMV9R3qEmgsRgBomN/gop8t442Fes3MA8cX7pTwtIQ54YMjDvKH9SLpgb7bQuv88cNGN AeEwri3YkF7foe8HhwKk4hgrHr65IT90nXePYED3YGwqGdEM2pVc/jT6A9plETpCSPtP Il+R0W9I2Y/NhqjsytWCZfDY3RTVxi01BNXDj0h8++qb06lPy/ZgEW6ZyizTbBqsysRS uXZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:to :from:dkim-signature:dkim-filter; bh=IxYOqRjOdwBEKdMZu0fM2Rd2VvA8LkpT0CISSCkxdmI=; b=w4JI3GYhpUwYEatp8d62brFjx8d2jV3T86CeoayNjnY+ooD6Wbv5VfquJMIkQVLTd2 mpdOfEPxs3BZr7tidb5eff/Fu9urgDuI5kDSW2ZbLN+RCo+tsDLdfBRWBP2vu4JmfW66 vElJN7mz/Cn07C7dP3Eh4eRvdgkupzstSoj+xSWDWkh5Ndb26i56z/XijO95mvuxUmny gbHVuKGnz1SZ0PxUQmzz/oYnPVkSdDDdz+xKrcDGzfGitsiMpqaMTeaKZnhiN1Y22CsF 7UPPcOZyPzaVSLqlQJXcNMNCMJk3aU7NFeMxccvWPhgUjvfyEnc9Vd2Mf7xLxK/lhESo VibA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@piap.pl header.s=mail header.b=EuDeMG2q; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=piap.pl Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v185si13821843pfb.65.2018.12.03.03.19.39; Mon, 03 Dec 2018 03:19:54 -0800 (PST) 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=@piap.pl header.s=mail header.b=EuDeMG2q; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=piap.pl Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726302AbeLCLTl (ORCPT + 99 others); Mon, 3 Dec 2018 06:19:41 -0500 Received: from ni.piap.pl ([195.187.100.4]:44770 "EHLO ni.piap.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725883AbeLCLTl (ORCPT ); Mon, 3 Dec 2018 06:19:41 -0500 X-Greylist: delayed 353 seconds by postgrey-1.27 at vger.kernel.org; Mon, 03 Dec 2018 06:19:40 EST Received: from t19.piap.pl (OSB1819.piap.pl [10.0.9.19]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ni.piap.pl (Postfix) with ESMTPSA id C2D67442FCC; Mon, 3 Dec 2018 12:13:06 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 ni.piap.pl C2D67442FCC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=piap.pl; s=mail; t=1543835587; bh=IxYOqRjOdwBEKdMZu0fM2Rd2VvA8LkpT0CISSCkxdmI=; h=From:To:Subject:Date:From; b=EuDeMG2qjaWF+0SDYnr0n2MKW+wnCFkhx3S++hmTAjjtiRPbTtZgJFoDToNlE/KSs dRgciWPjoHRU3hSHqQlcuzg5Mryt2Gq9UNhJuFYgp6DsybgZTZhYl9g09aq79bNTBa IIiRfnhbj3M/Rf9N4alsX2hRYUvh+k/WQzF29zgU= From: khalasa@piap.pl (Krzysztof =?utf-8?Q?Ha=C5=82asa?=) To: lkml , linux-arm-kernel , linux-i2c@vger.kernel.org, Lucas Stach Subject: [PATCH] ARM i.MX: Fix a kernel panic in i2c_imx_clk_notifier_call(). Date: Mon, 03 Dec 2018 12:13:06 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-KLMS-Rule-ID: 1 X-KLMS-Message-Action: clean X-KLMS-AntiSpam-Lua-Profiles: 132418 [Dec 03 2018] X-KLMS-AntiSpam-Version: 5.8.3.0 X-KLMS-AntiSpam-Envelope-From: khalasa@piap.pl X-KLMS-AntiSpam-Rate: 0 X-KLMS-AntiSpam-Status: not_detected X-KLMS-AntiSpam-Method: none X-KLMS-AntiSpam-Info: LuaCore: 214 214 dd5d82bb00ca93bd3dfb46ca097df6af04819311, {Tracking_DKIM, one}, {Tracking_ sender_matches_from}, Auth:dkim=pass header.d=piap.pl, DmarcAF: none X-KLMS-AntiSpam-Interceptor-Info: scan successful X-KLMS-AntiPhishing: Clean, 2018/11/29 11:35:34 X-KLMS-AntiVirus: Kaspersky Security 8.0 for Linux Mail Server, version 8.0.1.721, bases: 2018/12/03 03:56:00 #9342701 X-KLMS-AntiVirus-Status: Clean, skipped Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Krzysztof Halasa --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c @@ -510,9 +510,9 @@ static int i2c_imx_clk_notifier_call(struct notifier_block *nb, unsigned long action, void *data) { struct clk_notifier_data *ndata = data; - struct imx_i2c_struct *i2c_imx = container_of(&ndata->clk, + struct imx_i2c_struct *i2c_imx = container_of(nb, struct imx_i2c_struct, - clk); + clk_change_nb); if (action & POST_RATE_CHANGE) i2c_imx_set_clk(i2c_imx, ndata->new_rate);