From patchwork Mon Dec 3 11:13:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Krzysztof_Ha=C5=82asa?= X-Patchwork-Id: 10709203 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2E9CF13BF for ; Mon, 3 Dec 2018 11:13:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1DA0C285A0 for ; Mon, 3 Dec 2018 11:13:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 115D92B341; Mon, 3 Dec 2018 11:13:36 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 683FF2B335 for ; Mon, 3 Dec 2018 11:13:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=ywaVYxAKL9rKSVuTG2rLT1a2qvpva+VAzk3mboi1GCQ=; b=rghXXO1PzDwErT xOTrb4SZ/TQpqpoupUEd4tfk4KmTIuwt0x12tBvyVXDMDLAbDdlcYMEWKvaqkTkdpV+crA+dYzgED Cp0OXltHCFFEVmG8JXiqRmhusFXEPwcqRfN/2r7sza161+deq3MFxH4pAqG4J9DGCGk7z/qH5ul0c hkhl60ki0jOipyrkaoBtaLQCKj7Ubl/C02LsJENdv2ltdAQcBEeixuH3FAha2ebPBRiyS+CI++3+9 16Lt05Z82TbkYd6Oxk6WrIK0qtZKKhBj+VC9Rgj9HmSp+7D31tBXJpDTLIHYUNG0l98Y2nm/A8iTT Rg+oHRvUSfIrl2hJ7Tdg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gTmAN-00034p-De; Mon, 03 Dec 2018 11:13:31 +0000 Received: from ni.piap.pl ([195.187.100.4]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gTmAJ-000333-2a for linux-arm-kernel@lists.infradead.org; Mon, 03 Dec 2018 11:13:30 +0000 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181203_031327_449343_A5B170A8 X-CRM114-Status: UNSURE ( 6.76 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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);