From patchwork Fri Feb 14 01:54:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 3649231 X-Patchwork-Delegate: broonie@sirena.org.uk Return-Path: X-Original-To: patchwork-linux-spi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 321D79F334 for ; Fri, 14 Feb 2014 01:54:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 578DB20179 for ; Fri, 14 Feb 2014 01:54:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D6FBA2020F for ; Fri, 14 Feb 2014 01:54:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751854AbaBNBya (ORCPT ); Thu, 13 Feb 2014 20:54:30 -0500 Received: from mail-pa0-f53.google.com ([209.85.220.53]:51944 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751582AbaBNBya (ORCPT ); Thu, 13 Feb 2014 20:54:30 -0500 Received: by mail-pa0-f53.google.com with SMTP id lj1so11591956pab.12 for ; Thu, 13 Feb 2014 17:54:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:content-type:mime-version:content-transfer-encoding; bh=J6ltKRPBJpAf3/tstWIvwrgucaYgNn6AQPiP7Zlh2hY=; b=XaUTCrkdrsMWE+JG6ARRt2P9O2UgtRD/oAiWx0op6t6xFkbOa4QzrtjGguM9YNh+q1 Nq3f08jsq+vZIerJ59SaUU/XUDo3/jHdGO5ICdZTXHxEY8r4gGJWg4Kn4AsurgGkjjNV EacOf15DfwDdM26lEQuwHBthxt5qQ8naGvZPLCnD+FfmYvACSEKmDXyiTkEVmi5CzPme I0UaQRF4UPvu5sWXyxf4qS1ygCqO8Pu5Xbp0NYGqqb/lhVmRmsUxktSMB7A5vksbrKF3 eLl8NEz4yxFY4h340aJnK7kuiBcJ1J7TUNM9WjUgaOjX3uJVjfzfArkuJcE8cqH7bI7s bW3Q== X-Gm-Message-State: ALoCoQk7xkVdr7kHTEtMGD1S6XihJHWcPR6VsXCZzCdr9nNH0F3tydoTwqR5XbyVz5+7eKxW/jj2 X-Received: by 10.68.0.99 with SMTP id 3mr5651360pbd.68.1392342869645; Thu, 13 Feb 2014 17:54:29 -0800 (PST) Received: from [192.168.0.102] (218-164-130-78.dynamic.hinet.net. [218.164.130.78]) by mx.google.com with ESMTPSA id os1sm27770248pac.20.2014.02.13.17.54.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 13 Feb 2014 17:54:29 -0800 (PST) Message-ID: <1392342865.22981.2.camel@phoenix> Subject: [PATCH 2/3] spi: coldfire-qspi: Remove unused dev field from struct mcfqspi From: Axel Lin To: Mark Brown Cc: Steven King , linux-spi@vger.kernel.org Date: Fri, 14 Feb 2014 09:54:25 +0800 In-Reply-To: <1392342780.22981.0.camel@phoenix> References: <1392342780.22981.0.camel@phoenix> X-Mailer: Evolution 3.6.4-0ubuntu1 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.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 Also remove unused *res variable in mcfqspi_remove(). Signed-off-by: Axel Lin --- drivers/spi/spi-coldfire-qspi.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/spi/spi-coldfire-qspi.c b/drivers/spi/spi-coldfire-qspi.c index 8e4f1c9c..0fcec3b 100644 --- a/drivers/spi/spi-coldfire-qspi.c +++ b/drivers/spi/spi-coldfire-qspi.c @@ -77,8 +77,6 @@ struct mcfqspi { struct mcfqspi_cs_control *cs_control; wait_queue_head_t waitq; - - struct device *dev; }; static void mcfqspi_wr_qmr(struct mcfqspi *mcfqspi, u16 val) @@ -430,7 +428,6 @@ static int mcfqspi_probe(struct platform_device *pdev) } init_waitqueue_head(&mcfqspi->waitq); - mcfqspi->dev = &pdev->dev; master->mode_bits = SPI_CS_HIGH | SPI_CPOL | SPI_CPHA; master->bits_per_word_mask = SPI_BPW_RANGE_MASK(8, 16); @@ -445,7 +442,7 @@ static int mcfqspi_probe(struct platform_device *pdev) dev_dbg(&pdev->dev, "spi_register_master failed\n"); goto fail2; } - pm_runtime_enable(mcfqspi->dev); + pm_runtime_enable(&pdev->dev); dev_info(&pdev->dev, "Coldfire QSPI bus driver\n"); @@ -467,9 +464,8 @@ static int mcfqspi_remove(struct platform_device *pdev) { struct spi_master *master = platform_get_drvdata(pdev); struct mcfqspi *mcfqspi = spi_master_get_devdata(master); - struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - pm_runtime_disable(mcfqspi->dev); + pm_runtime_disable(&pdev->dev); /* disable the hardware (set the baud rate to 0) */ mcfqspi_wr_qmr(mcfqspi, MCFQSPI_QMR_MSTR);