From patchwork Thu Aug 20 17:58:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vaishali Thakkar X-Patchwork-Id: 7046391 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CFF2CC05AC for ; Thu, 20 Aug 2015 17:58:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A4FD5205C2 for ; Thu, 20 Aug 2015 17:58:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C9A3120544 for ; Thu, 20 Aug 2015 17:58:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751608AbbHTR6q (ORCPT ); Thu, 20 Aug 2015 13:58:46 -0400 Received: from mail-pa0-f50.google.com ([209.85.220.50]:36548 "EHLO mail-pa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751365AbbHTR6p (ORCPT ); Thu, 20 Aug 2015 13:58:45 -0400 Received: by pawq9 with SMTP id q9so33075505paw.3; Thu, 20 Aug 2015 10:58:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=WXYAUyXfN9wlJzYM+bYyHDyjDJI//q+j64GZtpGtp60=; b=oalQxkGIbXLTDhfFNLr/pGDwlkuRS/Plmf8Ftdyrg4DAGAmNKPAtnuYNgxR9pf++3A 4c2MssKAB3XL0eJH9japzROv817JwJIcAEl6DXMLeXEKzROkYnhhYTYXL4P/cwVqYuJQ 6+l7JdOkB+qju6GOWAzsuJHKQHJMDdhFh0b/E2Fs91JGgrq5gtFBjj6B3gAFMMswhR43 Gj94qBNspYr2F+2DF/gOhpKcV5dtium+f5H2Kk2NcRsTVxSpOZYnjj2SwFXInEj1wBoP Siz2eY15eyMhdkfILM3QE2NLPs7ijeQW9r0BIzhHEf40Imirpcja0jjd/LV1kz5X/cwC A3JQ== X-Received: by 10.68.201.105 with SMTP id jz9mr8733846pbc.86.1440093524948; Thu, 20 Aug 2015 10:58:44 -0700 (PDT) Received: from vaishali-Ideapad-Z570 ([150.107.241.198]) by smtp.gmail.com with ESMTPSA id gh5sm5037794pbc.87.2015.08.20.10.58.43 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 20 Aug 2015 10:58:44 -0700 (PDT) Date: Thu, 20 Aug 2015 23:28:38 +0530 From: Vaishali Thakkar To: Mark Brown Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] spi: bcm53xx: Adjust devm usage Message-ID: <20150820175838.GA4895@localhost> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) 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, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 Remove use of spi_unregister_master in remove function as devm_spi_register_master in probe function automatically handles it. To be compatible with the change, use direct return instead of goto and remove unnedded label out. Also, remove bcm53xxspi_bcma_remove as it is now redundant. Signed-off-by: Vaishali Thakkar --- drivers/spi/spi-bcm53xx.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/spi/spi-bcm53xx.c b/drivers/spi/spi-bcm53xx.c index 1520554..cc3f938 100644 --- a/drivers/spi/spi-bcm53xx.c +++ b/drivers/spi/spi-bcm53xx.c @@ -247,28 +247,19 @@ static int bcm53xxspi_bcma_probe(struct bcma_device *core) if (err) { spi_master_put(master); bcma_set_drvdata(core, NULL); - goto out; + return err; } /* Broadcom SoCs (at least with the CC rev 42) use SPI for flash only */ spi_new_device(master, &bcm53xx_info); -out: - return err; -} - -static void bcm53xxspi_bcma_remove(struct bcma_device *core) -{ - struct bcm53xxspi *b53spi = bcma_get_drvdata(core); - - spi_unregister_master(b53spi->master); + return 0; } static struct bcma_driver bcm53xxspi_bcma_driver = { .name = KBUILD_MODNAME, .id_table = bcm53xxspi_bcma_tbl, .probe = bcm53xxspi_bcma_probe, - .remove = bcm53xxspi_bcma_remove, }; /**************************************************