Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp916816ybp; Thu, 17 Oct 2019 05:33:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqw3KiEm2n/JtFOYGb3CaqQZNojgOye+he3GXh28pO4wW7V6Ywvt3C+ceA4B54aQfjmlJqU1 X-Received: by 2002:a17:906:1fc8:: with SMTP id e8mr3248376ejt.86.1571315631029; Thu, 17 Oct 2019 05:33:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571315631; cv=none; d=google.com; s=arc-20160816; b=mYnJ2lqulRE95uDp/dTU+LBj0odEVq9O81S/oziULgNSI4f7yHLh9GsZTd/e+tSuG7 Cj5C09EDDAmw4NRTA1txQeqR5Hp/hdDja2wY41mDfnnY7QtOPlcf35SBQSs93sSNzZWH kJcsH3z2/oDFkbCJ7I7Fr3WjNzkYU258JzlGrXeTRpMj0gbV4f4uFQMfKCIDlaUKp9zQ gdyjlREGMXt8kl6tkGjNuupkiabe8zRkvB2iYW0LAKoFJJ4Z9b1PP1Ld/gdlo9jh+Lw8 SOOMZdDO2qa49z5TytBxBuud8109jUjuZEzuNE/WgVYOjp2+4LQr96Kpn79hHZVbbzou jliQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:cc:from:subject:mime-version :message-id:date:dkim-signature; bh=KmHAeCmiFOkBGaykqemUU3bu3MBT3SFq3fZo9SBLQA0=; b=sU37aa7kBZVC1FFV7hHMlcvIQRiRCSHnWRTVoBHA8koAgIuS3Z+8wPo/C+i00svd0B mkI8UdwG2ef6ZOjiqy5omnL3mu/bsXqzBiAMHHTQCn3nFMzXtV2SYZOJanVb7JLA4j7o kcdUo4zOS1YGXDS2UbA8YLwl8R2fHST5Boh9g9rfUKTxK+QEWpDPhVREk9FSXB76cycv JvOd6z3mSm+X+BODcDV05DTKdfeWMUt+xl9zffUt4f0NPY2+U8esZ2syvEBjhWAieqsk 9ydIw7ddBUHnJitp2BH9ePUf6xbk5krfEXVpeP1MWlaM9BAwimxLVv90rZhdNtU66w0T q11Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=tx1xZc+0; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h13si1317456edw.348.2019.10.17.05.33.27; Thu, 17 Oct 2019 05:33:51 -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=@google.com header.s=20161025 header.b=tx1xZc+0; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404438AbfJPQk0 (ORCPT + 99 others); Wed, 16 Oct 2019 12:40:26 -0400 Received: from mail-qk1-f202.google.com ([209.85.222.202]:42475 "EHLO mail-qk1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389155AbfJPQkZ (ORCPT ); Wed, 16 Oct 2019 12:40:25 -0400 Received: by mail-qk1-f202.google.com with SMTP id b143so24343148qkg.9 for ; Wed, 16 Oct 2019 09:40:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:cc; bh=KmHAeCmiFOkBGaykqemUU3bu3MBT3SFq3fZo9SBLQA0=; b=tx1xZc+0ttcNVyH6dgx0gO8wsgU0mihhPb+RiRKk+HcpECEXVmWlY8ozvaLkS0c50k Ywlq/bCBFMCPCSHKDA3Z6Y64vl8kk+svg+xx2YbIoTMUOOCat0suCVcNT5sXBIm8XwaF HMHDlRDKFfqAY/4KYZorMk9ujRtgRT51qri49NfKncCMyk0qoZwZHw2lG6ixBpFh4229 ntO0JrbnM9BZLlJo2W0Mt3yzCkWcTJDcF7JBRyG6IVOVOQN+CieokpQikeA+vCV4mDfI THn6AsxJVslMxe+YSBK42QP4GY37vFyKPhH7U5rfE41zqzo70nu9aOd1M7KBi0DPcsR/ Arkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:cc; bh=KmHAeCmiFOkBGaykqemUU3bu3MBT3SFq3fZo9SBLQA0=; b=rjdDuIDbXYJC1KIMhROcMEl0JXyOS+/OEAcGuqQms/5Ml6v+8ffxB9iJHCNlodSIbH W48LoUUzRMz8I7VX2xu1+RAwMGYMvv3TNP1xAXtRCQ2WkMw4EPqwF4nLYS8vFHaY4uTx lg43eeUQEp5VeVd3CEooQw5CGbi3+KVmc0j8H4TtIhso1WjAa3IirIxUtpJmtQkKpTAA L07VIB7Gs+fBU8X8WufnxDubwAb4MiWY1pdo3fbbkc/Yf3by/yfSB9Iiu0udGU+k3sLL NiUb+TDARlx6IO2W5OU2c+znQxChyRj4VH6dAuUfui5eyf2xvaBngQLCDYmSVaYt5OW1 dKTg== X-Gm-Message-State: APjAAAUeO0d86u1gDrezuIhbgtVtFv6eWk9aOkYnQNw86e9yUhxmWiwc X8rPLT2XQE3QjreqIR0cYOgSfMs= X-Received: by 2002:ad4:4448:: with SMTP id l8mr20707050qvt.102.1571244023109; Wed, 16 Oct 2019 09:40:23 -0700 (PDT) Date: Wed, 16 Oct 2019 09:40:07 -0700 Message-Id: <20191016164014.146868-1-wvw@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.23.0.700.g56cf767bdb-goog Subject: [PATCH] thermal: update header and documentation From: Wei Wang Cc: wei.vince.wang@gmail.com, Wei Wang , Jonathan Corbet , Zhang Rui , Eduardo Valentin , Daniel Lezcano , Amit Kucheria , Mauro Carvalho Chehab , Guenter Roeck , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Content-Type: text/plain; charset="UTF-8" To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The commit commit f991de53a8ab ("thermal: make device_register's type argument const") changed APIs, but only when CONFIG_THERMAL enabled case. This patch is partial from https://lkml.org/lkml/2019/5/14/631 which tries to address the same concern, Signed-off-by: Wei Wang --- Documentation/driver-api/thermal/sysfs-api.rst | 4 ++-- include/linux/thermal.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Documentation/driver-api/thermal/sysfs-api.rst b/Documentation/driver-api/thermal/sysfs-api.rst index fab2c9b36d08..0ef337417922 100644 --- a/Documentation/driver-api/thermal/sysfs-api.rst +++ b/Documentation/driver-api/thermal/sysfs-api.rst @@ -39,7 +39,7 @@ temperature) and throttle appropriate devices. :: struct thermal_zone_device - *thermal_zone_device_register(char *type, + *thermal_zone_device_register(const char *type, int trips, int mask, void *devdata, struct thermal_zone_device_ops *ops, const struct thermal_zone_params *tzp, @@ -221,7 +221,7 @@ temperature) and throttle appropriate devices. :: struct thermal_cooling_device - *thermal_cooling_device_register(char *name, + *thermal_cooling_device_register(const char *name, void *devdata, struct thermal_cooling_device_ops *) This interface function adds a new thermal cooling device (fan/processor/...) diff --git a/include/linux/thermal.h b/include/linux/thermal.h index e45659c75920..ee235a29294e 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -501,12 +501,12 @@ static inline void thermal_zone_device_update(struct thermal_zone_device *tz, static inline void thermal_zone_set_trips(struct thermal_zone_device *tz) { } static inline struct thermal_cooling_device * -thermal_cooling_device_register(char *type, void *devdata, +thermal_cooling_device_register(const char *type, void *devdata, const struct thermal_cooling_device_ops *ops) { return ERR_PTR(-ENODEV); } static inline struct thermal_cooling_device * -thermal_of_cooling_device_register(struct device_node *np, - char *type, void *devdata, const struct thermal_cooling_device_ops *ops) +thermal_of_cooling_device_register(struct device_node *np, const char *type, + void *devdata, const struct thermal_cooling_device_ops *ops) { return ERR_PTR(-ENODEV); } static inline struct thermal_cooling_device * devm_thermal_of_cooling_device_register(struct device *dev, -- 2.23.0.700.g56cf767bdb-goog