From patchwork Fri Dec 20 12:52:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Poddar, Sourav" X-Patchwork-Id: 3388281 Return-Path: X-Original-To: patchwork-linux-spi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 90801C0D4A for ; Fri, 20 Dec 2013 12:53:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 42FBA206F1 for ; Fri, 20 Dec 2013 12:53:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EAE65206EF for ; Fri, 20 Dec 2013 12:53:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932397Ab3LTMxM (ORCPT ); Fri, 20 Dec 2013 07:53:12 -0500 Received: from comal.ext.ti.com ([198.47.26.152]:59124 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932341Ab3LTMxM (ORCPT ); Fri, 20 Dec 2013 07:53:12 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id rBKCr425016565; Fri, 20 Dec 2013 06:53:04 -0600 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id rBKCr4Vw017622; Fri, 20 Dec 2013 06:53:04 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.2.342.3; Fri, 20 Dec 2013 06:53:03 -0600 Received: from ula0131647.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id rBKCr19e029775; Fri, 20 Dec 2013 06:53:02 -0600 From: Sourav Poddar To: CC: , , , Sourav Poddar Subject: [PATCH] spi/qspi: Fix runtime resume path Date: Fri, 20 Dec 2013 18:22:57 +0530 Message-ID: <1387543978-32309-1-git-send-email-sourav.poddar@ti.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Due to the following commit commit 160a061301c7adf54c40696e7ceedc73f6b747dd Author: Wei Yongjun Date: Mon Nov 11 14:13:41 2013 +0800 spi/qspi: set correct platform drvdata in ti_qspi_probe() The ti_qspi_remove() use the platform drvdata as a type of struct ti_qspi, we should pass correct platform drvdata to platform_set_drvdata() in ti_qspi_probe(). Signed-off-by: Wei Yongjun Signed-off-by: Mark Brown platform_set_drvdata was changed in the probe, so we need to correspondingly change deferencing of qspi in runtime resume path. Else, this will lead to a NULL dereference pointer. Based on v3.13-rc3 Signed-off-by: Sourav Poddar --- drivers/spi/spi-ti-qspi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/spi/spi-ti-qspi.c b/drivers/spi/spi-ti-qspi.c index 4396bd4..06ee189 100644 --- a/drivers/spi/spi-ti-qspi.c +++ b/drivers/spi/spi-ti-qspi.c @@ -417,10 +417,8 @@ out: static int ti_qspi_runtime_resume(struct device *dev) { struct ti_qspi *qspi; - struct spi_master *master; - master = dev_get_drvdata(dev); - qspi = spi_master_get_devdata(master); + qspi = dev_get_drvdata(dev); ti_qspi_restore_ctx(qspi); return 0;