Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753090AbcD1Rml (ORCPT ); Thu, 28 Apr 2016 13:42:41 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:55878 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752135AbcD1Rmj (ORCPT ); Thu, 28 Apr 2016 13:42:39 -0400 Date: Thu, 28 Apr 2016 18:42:15 +0100 From: Mark Brown To: Octavian Purdila Cc: "Rafael J. Wysocki" , Len Brown , Matt Fleming , Wolfram Sang , Joel Becker , linux-acpi@vger.kernel.org, linux-efi@vger.kernel.org, linux-i2c@vger.kernel.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, irina.tirdea@intel.com Message-ID: <20160428174215.GS3217@sirena.org.uk> References: <1461105548-20618-1-git-send-email-octavian.purdila@intel.com> <1461105548-20618-7-git-send-email-octavian.purdila@intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Fbmjlltyndrrs22i" Content-Disposition: inline In-Reply-To: <1461105548-20618-7-git-send-email-octavian.purdila@intel.com> X-Cookie: Tomorrow, you can be anywhere. User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: 2a01:348:6:8808:fab::3 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [RFC PATCH v2 06/10] spi: add support for ACPI reconfigure notifications X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1399 Lines: 43 --Fbmjlltyndrrs22i Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Apr 20, 2016 at 01:39:04AM +0300, Octavian Purdila wrote: > + switch (value) { > + case ACPI_RECONFIG_DEVICE_ADD: > + master = acpi_spi_find_master_by_adev(adev->parent); > + if (!master) > + break; > + > + acpi_register_spi_device(master, adev); > + put_device(&master->dev); > + break; > + case ACPI_RECONFIG_DEVICE_REMOVE: > + spi = acpi_spi_find_device_by_adev(adev); > + if (!spi) > + break; There's more code here now than I remember but this all looks *really* close to the DT code except for the OF_POPULATED flag that we set when things are instantiated in DT. The duplication seems bad but the fact that we're missing the flag worries me... do we have guarantees that ACPI won't double register? --Fbmjlltyndrrs22i Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJXIkt2AAoJECTWi3JdVIfQpzsH/1n7hl+pE1kFRXGcgoE4Nfpc owPTtbAhGra2SXpf0bg9kFHrkidpshYpNMp2I5bBma1pr97xWvWVkksUNCb+zD/X 97x+eOBfVXAogdmrcorGbBWgF5Q/2o55oED9jPlHAufF7yXJhvxCrtD7hE2qWaEj xlvLE9w5BGmVQpg03emG/PIYVCV5LcFzmuA3UbYCe1uEp/xUb2IJbFm+6y2urIAw TN0/+aG5eRl+E90omFsswtCbSBtGVa8+HCPt135FxBCYuLz/FnaORmSKV2tjPMWF YcsnscsJODp550pbAtCGoOAjj6oZAnMZwx6gn7chT0r1unSBzp9ukUhSCLsmlDc= =oKzG -----END PGP SIGNATURE----- --Fbmjlltyndrrs22i--