Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp697471imm; Fri, 22 Jun 2018 03:53:32 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJegP77d4q/iYmoKJ2rEPSlOeR7aqsHNteXKpsHmD1XkhwKHDw+BhrOuGxnyZl6p1ncrMGu X-Received: by 2002:a62:99db:: with SMTP id t88-v6mr1210639pfk.118.1529664812508; Fri, 22 Jun 2018 03:53:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529664812; cv=none; d=google.com; s=arc-20160816; b=CykKXfObXRmPugiH0vhNZVdn5I0BZxNv9hHsChzqbdU6d+v+L2ANcx6MPoLcxZ7gEs lyslBcYv9RBdBmg0PnvaD+JQQQMHNm9aMP5QryRdVs1nEn2hPsgmqpmRVti6ZUQw5Yqu e75oO8EkhCxmjKo+lAFmafKUIbft1yiHNacN9mZoPPFHhoKhEmwIhfBTKoXJ+aMRFsgr 69F81+XO1FwtDIMrBvRcf0BxeB1Dtvz1ozmZm2g2JBCJjLR6Y4s564nueDcqFrIO6nWU zPbhT3p5emc8pmJ5WXEfr9jhHI+Mq8yrpuaQvviEliWj6q/T4MKngQ0e+IC61+qqfYGj SGKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:subject:cc:to:from:message-id:date :arc-authentication-results; bh=pV4Sv10i8s2EANjomDH/Agmg0SRFTzf68VquOkgSXoA=; b=C4PLweF66u9qlD5xSDpc5xmUp3ZTznZobtvWNyc/psHki9WfGLPjxMRTh1cUZKhwxh NyXUpaGUQU78HD/GS5zH9LxYvZAoKRZkLmdqcLSFgmtBwGZ6/h2sRm7QEDrUQx2+PPFz nKNFf2jDOH+z43EL2xsGNGyOe1Wg0gUW1bOn5A/IyoCBNqU+mViUviuMRpNiDuBRq4rW kyEb+AcPiV+lolmx9HMIY/NR2VZUbzQLhlO/rIqpGQPtJrqaoZX4JyeWLh30pll0TNVq b6xENrnYEQjFZTUlRzjqTYhkZxFfI7PIvLY9xNyh3T9tksKRcA2MQjMbRHez6WWKsxO/ lscw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 11-v6si7299026plc.466.2018.06.22.03.53.18; Fri, 22 Jun 2018 03:53:32 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933609AbeFVKwP (ORCPT + 99 others); Fri, 22 Jun 2018 06:52:15 -0400 Received: from mx2.suse.de ([195.135.220.15]:34145 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932918AbeFVKtw (ORCPT ); Fri, 22 Jun 2018 06:49:52 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id F01DFABEE; Fri, 22 Jun 2018 10:49:50 +0000 (UTC) Date: Fri, 22 Jun 2018 12:49:49 +0200 Message-ID: From: Takashi Iwai To: Robert Jarzmik Cc: "Mark Rutland" , "Rob Herring" , "Liam Girdwood" , "Mark Brown" , "Jaroslav Kysela" , , , Subject: Re: [PATCH 2/2] ALSA: ac97: add codecs devicetree binding In-Reply-To: <874lhvnlx1.fsf@belgarion.home> References: <20180621154356.5438-1-robert.jarzmik@free.fr> <20180621154356.5438-2-robert.jarzmik@free.fr> <874lhvnlx1.fsf@belgarion.home> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 22 Jun 2018 12:41:14 +0200, Robert Jarzmik wrote: > > Takashi Iwai writes: > > >> Special review query: review the "return of_node_get(node)", which > >> assumes that upon device removal, of_put_node(dev.of_node) will be > >> called... > > > > Is it really done automagically? I couldn't spot it. > Neither could I ... > > I based this on device_set_of_node_from_dev(), and the it "seemed" logical to me > that a device probed from devicetree would take a refcnt on the devicetree node. > > As the "logical" conflicted with my search for the automagical of_node_get(), I > need the special review query. Hm, some of these users (e.g. drivers/usb/core/*) do call of_node_put() properly at releasing, but some look leaking to me. I don't think we have the common code in the driver core to release dev->of_node, at least. If any, this should be done in ac97_codec_release(), I suppose. Takashi