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=-2.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 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 D6E8ACA9EA0 for ; Tue, 22 Oct 2019 13:39:04 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 A1EE12064B for ; Tue, 22 Oct 2019 13:39:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="dH70gUs2"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="r3lN2fcN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A1EE12064B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=GjGCNKWyTqOpQwKdCMP9dFgssIjkE8fKHdFT6v/xg6U=; b=dH70gUs2aWjv46bbR9tb5LjIr lQYwFOiRFx4p3TxbKnb05Socaq+JKomwHGm/a1szbdX459NpZGRfGXyN8S43rg4Jw5onqRnvgJ9kq BdxdiLuTi94CMdmjazebouVZUXgfy496zOMhJ0oDQkSKvVMlhJjksO9txIdLLRPhO6Y9CzZrCMrx0 ai37D0Bjpv61VeAwM94Qcbh6e+6xnOl95jR8hWTJX7UGCLE5ZGXqq/BzbrzvfBoj8FLOgGgWg1VZV YZYi2GOZqU1mro4a4klxYdnf7D7GH3CXVFPJ0cCH73ZXJrd5WFBbmGUqQbrlm7+aUGFxGx30A7fCR 9PpmwqLng==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iMuNM-0003if-6Q; Tue, 22 Oct 2019 13:39:04 +0000 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iMuNI-0003i6-V1 for linux-arm-kernel@lists.infradead.org; Tue, 22 Oct 2019 13:39:02 +0000 Received: by mail-pl1-x644.google.com with SMTP id d22so8388694pls.0 for ; Tue, 22 Oct 2019 06:39:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=gpoW/8Yw0CDfvnTYDUEt7wnlvPB+LdjenekF+dbtjls=; b=r3lN2fcNiqbiD+lTtxMThvS7h5kEpehwJT2wWH9MYxpdx0zW6ZvPe5+oJTGHBdo3UJ +1snUlb5BmZKfZgCMc5oHa9QCVpM51bJtLcoi0n8l6jvNxfYgPFgQ3xMC4wejMQvvNYf FLjLePAA2nsc9FCaZLwszr/yv2z8Vo+c37bA8ZqlWGieYmxcCBCFDjIlAayEvRnKlNTe rqo/FUiZITczTRPc6fHUG/C01orY7LXqFnZKXsZ7XIBhPyrITrbCxMUTxVQfktXKt10E YtnLrgW/UV4XeUX78ycvlYJllBR+2c+GHpwybsbZFCsZd91dCUD8z8jlNuKghFtR7G86 EPSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=gpoW/8Yw0CDfvnTYDUEt7wnlvPB+LdjenekF+dbtjls=; b=nPEa9vmQfZ4/6zSkp7YAebbS4JD3ycPnA5YsCRh8lUdvhqLzaBVg99Vbx67Rj9Byw2 CqbMpvEiGOT1soAE/Ns9pVQmjYz5IKYY4vUDwP81dy+RdMOdaHvSa0ZWxS2hvD+lvSVr XxFODnCFE4gWcyYaKb3DyiFgNjaLndR1ooSGxMkeUSfJ4cCscBy6yVAeQJJ2LDtIatRV Ef87LP68fZFKrbwfOW3hphMMRrQEPe5m4g6bFzszz7fCr9HaZmZ9+jCSHT3DR2xgoE0P FTZfqa0wxx8O9MAk6Jn7AHFVBkgvmDXmtujk9FRlHmqyMdLdR/AnrDgIxkjFRZW8Gg7v a4Og== X-Gm-Message-State: APjAAAXLlZ71YpRmohCfm2o26nO/vr+Am+/ypv5Q7Qnz/Opte22Gym6Z sOa95Pfsl15RWH0wnrM5yBrae3i9 X-Google-Smtp-Source: APXvYqxnblBiUF+4VE72i3RD2Q7pDJaYooI6GNAv8EneUhqFZsEv0k6WdGtSCJU5/e/gq6M4YVlHIA== X-Received: by 2002:a17:902:d90f:: with SMTP id c15mr3753482plz.157.1571751540152; Tue, 22 Oct 2019 06:39:00 -0700 (PDT) Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id f188sm22206087pfa.170.2019.10.22.06.38.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Oct 2019 06:38:59 -0700 (PDT) Subject: Re: [PATCH 09/46] watchdog: sa1100: use platform device registration To: Arnd Bergmann References: <20191018154052.1276506-1-arnd@arndb.de> <20191018154201.1276638-9-arnd@arndb.de> From: Guenter Roeck Message-ID: <21d72661-a4f1-d51f-ddf0-f8cebb984029@roeck-us.net> Date: Tue, 22 Oct 2019 06:38:57 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191022_063901_030275_B09D7E62 X-CRM114-Status: GOOD ( 18.55 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: LINUXWATCHDOG , Linus Walleij , "linux-kernel@vger.kernel.org" , Haojian Zhuang , Linux ARM , Wim Van Sebroeck , Robert Jarzmik , Daniel Mack Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 10/22/19 2:44 AM, Arnd Bergmann wrote: > On Sat, Oct 19, 2019 at 4:07 PM Guenter Roeck wrote: > >>> @@ -319,10 +316,13 @@ static struct platform_device *sa11x0_devices[] __initdata = { >>> >>> static int __init sa1100_init(void) >>> { >>> + struct resource wdt_res = DEFINE_RES_MEM(0x90000000, 0x20); >>> pm_power_off = sa1100_power_off; >>> >>> regulator_has_full_constraints(); >>> >>> + platform_device_register_simple("sa1100_wdt", -1, &wdt_res, 1); >>> + >>> return platform_add_devices(sa11x0_devices, ARRAY_SIZE(sa11x0_devices)); >> >> Wouldn't it be better to add the watchdog device to sa11x0_devices ? > > Generally speaking, platform_device_register_simple() is better than > platform_add_devices(), it does the same thing with fewer source lines > and smaller object code, and it doesn't have the problem of lifetime rules > for statically allocated reference-counted devices. > > One day we may want to replace all static platform_device instances with > platform_device_info instead, but right now there are too many of those. > > I can change this one to a platform_device for consistency though if you > think it's worth it. > No, I was just wondering. Thanks for the explanation. Guenter _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel