From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [PATCH v9 07/12] ARM: EXYNOS: introduce soc specific pm ops Date: Thu, 30 Mar 2017 16:03:59 +0200 Message-ID: References: <1490879826-16754-1-git-send-email-pankaj.dubey@samsung.com> <1490879826-16754-8-git-send-email-pankaj.dubey@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from mail-oi0-f68.google.com ([209.85.218.68]:34300 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933426AbdC3OEB (ORCPT ); Thu, 30 Mar 2017 10:04:01 -0400 Received: by mail-oi0-f68.google.com with SMTP id t11so4738121oib.1 for ; Thu, 30 Mar 2017 07:04:00 -0700 (PDT) In-Reply-To: <1490879826-16754-8-git-send-email-pankaj.dubey@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org List-Id: linux-samsung-soc@vger.kernel.org To: Pankaj Dubey Cc: linux-samsung-soc@vger.kernel.org, Linux ARM , Krzysztof Kozlowski , Marek Szyprowski , Kukjin Kim , m.reichl@fivetechno.de, a.hajda@samsung.com, cwchoi00@gmail.com, Javier Martinez Canillas On Thu, Mar 30, 2017 at 3:17 PM, Pankaj Dubey wrote: > + .soc_id = "EXYNOS5250", > + .data = &exynos_common_s2r_data > + }, > + { > + .soc_id = "EXYNOS5260", > + .data = &exynos_common_s2r_data > + }, > + { > + .soc_id = "EXYNOS5440", > + .data = &exynos_common_s2r_data > + }, > + { > + .soc_id = "EXYNOS5410", > + .data = &exynos_common_s2r_data > + }, > + { > + .soc_id = "EXYNOS5420", > + .data = &exynos_common_s2r_data > + }, > + { > + .soc_id = "EXYNOS5800", > + .data = &exynos_common_s2r_data If these are all the same, just make that soc_id="EXYNOS5*" to match them all at once. > +int __init exynos_s2r_init(void) > +{ > + const struct soc_device_attribute *match; > + > + match = soc_device_match(exynos_soc_revision); > + > + if (match) > + s2r_data = (const struct exynos_s2r_data *) match->data; > + > + if (!s2r_data) > + return -ENODEV; > + > + return 0; > +} > +arch_initcall(exynos_s2r_init); > + Can you replace the arch_initcall with a direct call from the machine init function? Arnd From mboxrd@z Thu Jan 1 00:00:00 1970 From: arnd@arndb.de (Arnd Bergmann) Date: Thu, 30 Mar 2017 16:03:59 +0200 Subject: [PATCH v9 07/12] ARM: EXYNOS: introduce soc specific pm ops In-Reply-To: <1490879826-16754-8-git-send-email-pankaj.dubey@samsung.com> References: <1490879826-16754-1-git-send-email-pankaj.dubey@samsung.com> <1490879826-16754-8-git-send-email-pankaj.dubey@samsung.com> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Thu, Mar 30, 2017 at 3:17 PM, Pankaj Dubey wrote: > + .soc_id = "EXYNOS5250", > + .data = &exynos_common_s2r_data > + }, > + { > + .soc_id = "EXYNOS5260", > + .data = &exynos_common_s2r_data > + }, > + { > + .soc_id = "EXYNOS5440", > + .data = &exynos_common_s2r_data > + }, > + { > + .soc_id = "EXYNOS5410", > + .data = &exynos_common_s2r_data > + }, > + { > + .soc_id = "EXYNOS5420", > + .data = &exynos_common_s2r_data > + }, > + { > + .soc_id = "EXYNOS5800", > + .data = &exynos_common_s2r_data If these are all the same, just make that soc_id="EXYNOS5*" to match them all at once. > +int __init exynos_s2r_init(void) > +{ > + const struct soc_device_attribute *match; > + > + match = soc_device_match(exynos_soc_revision); > + > + if (match) > + s2r_data = (const struct exynos_s2r_data *) match->data; > + > + if (!s2r_data) > + return -ENODEV; > + > + return 0; > +} > +arch_initcall(exynos_s2r_init); > + Can you replace the arch_initcall with a direct call from the machine init function? Arnd