From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 536B5C3F2CD for ; Tue, 3 Mar 2020 11:11:21 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BA3D7206E6 for ; Tue, 3 Mar 2020 11:11:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=ellerman.id.au header.i=@ellerman.id.au header.b="UypcrMBp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BA3D7206E6 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 48WvTK6YgKzDq5y for ; Tue, 3 Mar 2020 22:11:17 +1100 (AEDT) Received: from ozlabs.org (bilbo.ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 48WvQg1XlDzDqXX for ; Tue, 3 Mar 2020 22:08:59 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ellerman.id.au header.i=@ellerman.id.au header.a=rsa-sha256 header.s=201909 header.b=UypcrMBp; dkim-atps=neutral Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 48WvQc1wlyz9sPR; Tue, 3 Mar 2020 22:08:55 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1583233737; bh=k64NAu+e8vHywQUsmy2fGAqOQOwSxRoTHJg5kp4QCCQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=UypcrMBp8z4HaDPrg6/sUKX90uFz55RsiEwy4YCz4HtwSBAOHDnc8kzhdwoNYREud cu1JyMV+ssNOyVlvixyo2/sxRrxy6SmWDHwjhYHMUZx68LXugkm5Eywy0WqibCrllE +V2jJ2lWVvo8cVWUlUGgB3q2eEegxr+EnGNrywoZGkm/5lyHdIbTrvlwTWlbpMmZ1q rxgPlXdymysKRtuFneCGX9QaIZDa3QdHnAs9nON4TIMOJTiRzNPo88crzoMT7KYIct QK6HOjqNxY+YyRpkrEylQUovQfTqguDlKuRVwvm4kWo1fsZEfOfwORevzcwFzgVgzg ROzxxIupN3Kqw== From: Michael Ellerman To: Wolfram Sang , linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH] macintosh: therm_windtunnel: fix regression when instantiating devices In-Reply-To: <20200228170033.GB1130@ninjato> References: <20200225141229.5424-1-wsa@the-dreams.de> <20200228170033.GB1130@ninjato> Date: Tue, 03 Mar 2020 22:08:52 +1100 Message-ID: <87y2shr8zf.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mathieu Malaterre , Erhard Furtner , debian-powerpc@lists.debian.org, linux-i2c@vger.kernel.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Wolfram Sang writes: > On Tue, Feb 25, 2020 at 03:12:29PM +0100, Wolfram Sang wrote: >> Removing attach_adapter from this driver caused a regression for at >> least some machines. Those machines had the sensors described in their >> DT, too, so they didn't need manual creation of the sensor devices. The >> old code worked, though, because manual creation came first. Creation of >> DT devices then failed later and caused error logs, but the sensors >> worked nonetheless because of the manually created devices. >> >> When removing attach_adaper, manual creation now comes later and loses >> the race. The sensor devices were already registered via DT, yet with >> another binding, so the driver could not be bound to it. >> >> This fix refactors the code to remove the race and only manually creates >> devices if there are no DT nodes present. Also, the DT binding is updated >> to match both, the DT and manually created devices. Because we don't >> know which device creation will be used at runtime, the code to start >> the kthread is moved to do_probe() which will be called by both methods. >> >> Fixes: 3e7bed52719d ("macintosh: therm_windtunnel: drop using attach_adapter") >> Link: https://bugzilla.kernel.org/show_bug.cgi?id=201723 >> Reported-by: Erhard Furtner >> Tested-by: Erhard Furtner >> Signed-off-by: Wolfram Sang > > Applied to for-current, thanks! Thanks. cheers