Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4336259imm; Mon, 18 Jun 2018 13:09:56 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJRp7l2s0Dju+aARkdBoeCe53uaAyKaO5nrmkbcvGWllGbdWEonVvFhhAaBW0nxt0hf3TYh X-Received: by 2002:a62:a104:: with SMTP id b4-v6mr15088737pff.159.1529352596350; Mon, 18 Jun 2018 13:09:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529352596; cv=none; d=google.com; s=arc-20160816; b=sW2brh6Wba0izM6iJfnLMoZgo492fwyTgGoA35yLkgtNMN5EaoWouaPSr5Taf41NGf Gb8fIWpT+Ww4tn2ESCEhAbZm1HKik5Al6NIviSaY33UMNL8uDE6tWZ8AqU7N+szUEbU/ YbXZ73gCHrCFtZ0JNUARKYo+CPlYuPCROztquoETkD2/4A3X5or5YTh6nGzopQhTPoBz LcH6JgbdQqI3hiDz8eFh5agdAuJSREAiNJ5uosSZVF8CTcQf6imH/HKOwErb3fvLAT8Z lDao9UbE7U8ZJjXhFQswQ1176lPv1bqZ9YU0kH+Ya6Eloo28OO2Tu2mhvhyVrhRnppEa sSog== 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=1KmgZ9mnv+nsIee+Ljvl9StSpRoOe5RrOrfteH4umHU=; b=LrUH8vSSBuemdT8893g39/5CT+LGxWrT/w9kas/2OcIe5A7cIgZihUTaboO1ITJg8s rh9SIeGt6hWwEe2w9d4DcXPhZ6mnITNFrY3FQeqWEl/FtRuyQwAU4DTAa4brHdpaMoWd T5GKgfL30wdVWoKM8RX+bfa1SNTzutJyxXjtqudFysQnXO2IetPBhOCI69Qjs+4AM4+G gtLa5KvHaMluTl7cJsqz6QUtwffYqIMCtHS4YUieEP5BSI0LTyvyqg6i1ETIA6XFnNsU 5F9qZgPkcz+o1nt3WxylxEhkXKVtV5P6YB2x5uuRQKcv9hp1Z+LEyor7ZLcSjjQWfart +gsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aqcpD38Y; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r65-v6si14873105pfk.83.2018.06.18.13.09.42; Mon, 18 Jun 2018 13:09:56 -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=pass header.i=@linaro.org header.s=google header.b=aqcpD38Y; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933834AbeFRUIy (ORCPT + 99 others); Mon, 18 Jun 2018 16:08:54 -0400 Received: from mail-lf0-f66.google.com ([209.85.215.66]:46410 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755368AbeFRUIw (ORCPT ); Mon, 18 Jun 2018 16:08:52 -0400 Received: by mail-lf0-f66.google.com with SMTP id u5-v6so5347291lff.13 for ; Mon, 18 Jun 2018 13:08:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=1KmgZ9mnv+nsIee+Ljvl9StSpRoOe5RrOrfteH4umHU=; b=aqcpD38YvFvpIUjWEcioRyMPRjDRBEOlQLQ7dt1sEgwF1cfLf0kIc3XrLFI17KwZNP qwxrP19ASDCyfnsY6elDpsJ7qzz5dodReV5RCdmc5mRxYecF77vTAWRn/4G5I3xysWjN HEKgqwccfKIOqD55cM0M+LS1+kOdndQBSz1Z4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=1KmgZ9mnv+nsIee+Ljvl9StSpRoOe5RrOrfteH4umHU=; b=Jat69iYeLXhedqnM2htTvmFK4FSSWJTiA0n9rkDakYC38aVnh5muDShKxn0H2+KkAK W+THkqXx6shCtVXmShPYt2f75060Ppf+ECNxax9IT2PMMF07BsxDDUxqC6xWamyxZ6Qq KWzwp2j2zdo5h74ctKICBN5Ez2szE/laQ5xJl+pivs2EJEKCuuL7zR4PnwmYkFXOhSyg +hXu3zpQjH2uM4O4kYBBHiV9lWdtLVMiumKm7Cvz5sv7QQEKmF0ZlH3JAVUJ9gnC7VOT mDBS/IKLgGu2VbX+5TcsdwMt5a/vxWxdI7ZktqCSOzJIHn8e5f7Lw+UcHlZWrmdj2BZu F7pg== X-Gm-Message-State: APt69E2lYvAJiYYJFF+QQ4ZI4JuBgJkyHn+liT0kt6ya1XEz5nptpyOA mLB4BelAQvAXAgHZEuoUz4YgqQ== X-Received: by 2002:a2e:2206:: with SMTP id i6-v6mr8956333lji.119.1529352531480; Mon, 18 Jun 2018 13:08:51 -0700 (PDT) Received: from centauri.lan (h-229-118.A785.priv.bahnhof.se. [5.150.229.118]) by smtp.gmail.com with ESMTPSA id w1-v6sm2945493lfk.59.2018.06.18.13.08.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Jun 2018 13:08:51 -0700 (PDT) Date: Mon, 18 Jun 2018 22:08:48 +0200 From: Niklas Cassel To: Rob Herring Cc: Mark Brown , Frank Rowand , Andy Gross , Patrick Lai , Banajit Goswami , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , linux-arm-msm , Linux-ALSA , "linux-kernel@vger.kernel.org" , srinivas.kandagatla@linaro.org Subject: Re: [PATCH v2 5/7] ASoC: qdsp6: Add depends on OF Message-ID: <20180618200848.GA32482@centauri.lan> References: <20180614111138.8923-1-niklas.cassel@linaro.org> <20180614111138.8923-6-niklas.cassel@linaro.org> <20180618110642.GA6928@sirena.org.uk> <20180618123932.GA28476@centauri.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 On Mon, Jun 18, 2018 at 08:48:32AM -0600, Rob Herring wrote: > On Mon, Jun 18, 2018 at 6:39 AM, Niklas Cassel wrote: > > On Mon, Jun 18, 2018 at 12:06:42PM +0100, Mark Brown wrote: > >> On Thu, Jun 14, 2018 at 01:11:36PM +0200, Niklas Cassel wrote: > >> > of_platform_device_destroy is only defined when building > >> > with CONFIG_OF=y. Add a depends on OF. > >> > >> Is it sensible that of_platform_device_destroy() is only defined when > >> building with CONFIG_OF=y? > > > > I'm redirecting that question to the device tree maintainers. > > > > There are a few of_* functions in include/linux/of_platform.h > > that are only defined when CONFIG_OF=y: > > > > of_platform_device_create() > > of_platform_device_destroy() > > of_platform_bus_probe() > > of_device_alloc() > > > > Rob, Frank, do you want me to create static inline dummy versions of these? > > No, because generally you should not be using these functions > directly. Yes, there are some users, but if you look at the tree, > there are few or isolated (PowerPC) users. Using > of_platform_populate/of_platform_depopulate is preferred. of_platform_device_destroy() is also used by sound/soc/qcom/qdsp6/* which is why I suggested this patch: https://marc.info/?l=alsa-devel&m=152932497413567 that adds "depends on OF" for SND_SOC_QDSP6 in sound/soc/qcom/Kconfig. Or do you think that a better solution would be to modify sound/soc/qcom/qdsp6/* so that it instead uses of_platform_populate()/of_platform_depopulate()? (Or perhaps this isn't even an option, I'm not at all familiar with the QDSP6 code). Regards, Niklas