Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp5304115imm; Tue, 19 Jun 2018 08:17:35 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKhu+fELIjcgao5y4dMeglK8ZBmP+/j4YFOn4bEAFBTeg3rZ4/tGZRmibXQW0gxWp7qgmTo X-Received: by 2002:a17:902:1101:: with SMTP id d1-v6mr19006601pla.147.1529421455108; Tue, 19 Jun 2018 08:17:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529421455; cv=none; d=google.com; s=arc-20160816; b=ufuFI3qwZGV+BgrC9Hl8dCW8nZ/0gU0CEtgEBb6jpzQKl9ObupWsx1USULaJo9w7eR tRDfkYVr1BOBPLCq2BKD9JS5k1ZiNrb8XJn95Nuiaa4zkmZnh1CKqbiKQB/kMR1boXie rJZshSjGBvROqCv1a4i5d1lYusvVl2QEkob/KxYGlNH72UVolTo3AdkWanvSpa5cIJXx ltB/WPbPGgKroVDTxLBGltPZByf+zcHk+e2zPqJ+bQUT2iX61nOFD+F6HBR59ifdBs9U nkMs1p3aYVEQXhjkfQaigGrU5aZgjWSrMNI4gAI6dbhiYmLTwIbJ7jAj3veP7nVlHgv/ LMcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=EBZ5V7ApmFkeJ3RMs1nUNKSgYZA5r7pv9Yi+iN4nOOA=; b=jq1I3TqZGcsF0zTpE1smwmWQ2W+VU1ivUPZ/5J0VPMowbAkOp2VJyVgSAPLTSvP2zQ sIqOW4QtR0J1ckQjy+g5wRoHZM0d6xS5wjuLkynPgTzoWKQ1Jw5WpNqnFxBAPtdstWOE Ukha+Mxu1ndWDchcXmmhI2PhrmYE3HN13Szf4B0x5P+gHwr+M4os+ruv/SFhEwMS+MKY owdTfKw8mCLCYVaxpEH1YmLNOswwLdY6HIizl30B94+uanFrX01AR2i8dsEDPPuaDtIF 6XmjIH40li0CrQBomo/vowvIL5zREiqaCAbdTdxOD6gaDFn9Fr6NjRgsP/YS1DtiN8FJ +jeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b="hCHoHDA/"; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z141-v6si18152941pfc.95.2018.06.19.08.17.21; Tue, 19 Jun 2018 08:17:35 -0700 (PDT) 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=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b="hCHoHDA/"; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966571AbeFSPPZ (ORCPT + 99 others); Tue, 19 Jun 2018 11:15:25 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:51152 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966451AbeFSPPW (ORCPT ); Tue, 19 Jun 2018 11:15:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=EBZ5V7ApmFkeJ3RMs1nUNKSgYZA5r7pv9Yi+iN4nOOA=; b=hCHoHDA/AZo38B0EJRxM5jjMU J9GmjADzg3CXJTT+qAKqL94GrszX2nadmKzzolVRZOuQRaidyn2FtZCKSq6ki1VmsWPJaDT8WGQmn Q1aOBsp6doBtjT3j2TQ3G2nzKUqMYIRBc20m2XtAVacNMCpRwJhYqk6Ibj/67I5LUN02U=; Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1fVILa-0001Kh-Mq; Tue, 19 Jun 2018 15:15:06 +0000 Received: from broonie by debutante with local (Exim 4.91) (envelope-from ) id 1fVILa-0001qZ-5E; Tue, 19 Jun 2018 16:15:06 +0100 Date: Tue, 19 Jun 2018 16:15:06 +0100 From: Mark Brown To: Piotr Bugalski Cc: linux-spi@vger.kernel.org, David Woodhouse , Brian Norris , Boris Brezillon , Marek Vasut , Richard Weinberger , linux-mtd@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Rob Herring , Mark Rutland , Nicolas Ferre , Alexandre Belloni , Cyrille Pitchen , Tudor Ambarus , Piotr Bugalski Subject: Re: [RFC PATCH 1/2] spi: Add QuadSPI driver for Atmel SAMA5D2 Message-ID: <20180619151506.GG11230@sirena.org.uk> References: <20180618162124.21749-1-bugalski.piotr@gmail.com> <20180618162124.21749-2-bugalski.piotr@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="O8XZ+2Hy8Kj8wLPZ" Content-Disposition: inline In-Reply-To: <20180618162124.21749-2-bugalski.piotr@gmail.com> X-Cookie: If you suspect a man, don't employ him. User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --O8XZ+2Hy8Kj8wLPZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Jun 18, 2018 at 06:21:23PM +0200, Piotr Bugalski wrote: > +static int atmel_qspi_adjust_op_size(struct spi_mem *mem, struct spi_mem_op *op) > +{ > + return 0; > +} If this can be empty should we adjust the callers to allow it to just be omitted? > +static int atmel_qspi_remove(struct platform_device *pdev) > +{ > + struct spi_controller *ctrl = platform_get_drvdata(pdev); > + struct atmel_qspi *aq = spi_controller_get_devdata(ctrl); > + > + qspi_writel(aq, QSPI_CR, QSPI_CR_QSPIDIS); > + clk_disable_unprepare(aq->clk); > + > + spi_unregister_controller(ctrl); > + > + return 0; > +} You should unregister the controller before disabling the hardware, otherwise something could come in and try to start an operation on the controller (or already be running one) while the hardware is disabled which might blow up. --O8XZ+2Hy8Kj8wLPZ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlspHfkACgkQJNaLcl1U h9Cymgf+MbrO5iP90HOZ4RRfuC7+k40zc4d09EiG7izyzvJ2/tYUEuSN13tnVCnS kLf/EzOTei8n+cWU4jsetP27cVnhFSwAWAlnFQFYtd7yUV/e9bkoLIhuNTPs8RA7 pDtsc8bwrYqfxq0G/KoH2kUqa60fFnCRxxRkcTkaldu7oKe8m4i8pEdYVp52CSkl 1KHxfemgHnx40BFB9Aw2jS1UR5S812PVth6m9XV+qwphuUvlSkquORFe0uv0rNum 4AOK+w4QXvcZp/B9W1nEcwcsccDBJ082oMsI/kUj1rbCy7DlE8gI2OHufN9AlM/R UXvlT50vdrssQaiicBHXd8Riqf18CA== =2QLs -----END PGP SIGNATURE----- --O8XZ+2Hy8Kj8wLPZ--