From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933416AbcIEKCQ (ORCPT ); Mon, 5 Sep 2016 06:02:16 -0400 Received: from mail-it0-f68.google.com ([209.85.214.68]:32943 "EHLO mail-it0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933030AbcIEKB7 (ORCPT ); Mon, 5 Sep 2016 06:01:59 -0400 MIME-Version: 1.0 In-Reply-To: References: From: Geert Uytterhoeven Date: Mon, 5 Sep 2016 12:01:58 +0200 X-Google-Sender-Auth: E0wLafiHd6BM2kamMoeM0Lm2POU Message-ID: Subject: Re: [PATCH 2/5 v2] thermal: rcar_gen3_thermal: Add R-Car Gen3 thermal driver To: Khiem Nguyen Cc: Kuninori Morimoto , Wolfram Sang , Geert Uytterhoeven , Magnus Damm , Zhang Rui , Eduardo Valentin , Rob Herring , Mark Rutland , "linux-pm@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "Thao Phuong Le. Nguyen" , Hien Dang , Toru Oishi Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Khiem On Sat, Sep 3, 2016 at 7:25 AM, Khiem Nguyen wrote: > --- /dev/null > +++ b/drivers/thermal/rcar_gen3_thermal.c > +static int rcar_gen3_thermal_probe(struct platform_device *pdev) > +{ > + priv->id = of_alias_get_id(dev->of_node, "tsc"); > + if (priv->id < 0) { > + dev_err(dev, "Failed to get alias id (%d)\n", priv->id); > + ret = priv->id; > + goto error_unregister; > + } In v1, Morimoto-san wondered whether the alias is really needed, but you haven't addressed his question. While aliases can be useful in DT source files, using aliases like this imposes hardcoded instance numbers, which is something we try to avoid these days. Also, this puts a hard requirement on the presence of the alias in DT, which should be documented in the DT bindings. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds