Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5612016ybl; Tue, 10 Dec 2019 08:43:07 -0800 (PST) X-Google-Smtp-Source: APXvYqxnS3s+a4n5AIhJmNvmWIh8Mn1OzflF6WDic61ZttHiVcBW+mGZxKyKTq4K6Eic4rX8oI3Y X-Received: by 2002:aca:48cf:: with SMTP id v198mr4750708oia.35.1575996187460; Tue, 10 Dec 2019 08:43:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575996187; cv=none; d=google.com; s=arc-20160816; b=tl11kc96MA1FGE347i4L3t8uU+VMV65aLhqxF5TnLUKb+aU1iaN9MqmFPP0C2vAkHg 4cTCScuedrjoDZXYfcitr6tGiCBDT3t/AIC5+8MB58YqzvdBmsty23lP1I1/NpB087LM xSaYzUn0JfEuF/yKz4miG0NPa/6zLkVTvhkY7pNutrm22+PtYUeNJsepXRpp9tcsN1Ep CgbWohNN8rUxhxG4JWXUrQfprOCu1QcY4IhNRp+4z7NZOHzQ+AnM1fJtzpM3jCwRPqy+ /Ul3cDbidXvIut2tjV5s3zmE4WtVhg0C10ALQzvyu4dpcI7M9oV4trGJ9E3HY/9fWzfK OpxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=KrHHV8WagrQw//LLkgB8ANSCBK2Q9bQ9Pa7bMN8q10Q=; b=WaKTMxuL5eY0gL88dgWaNvbme5tpZosctPwHsuPIT0588Rs6s+Fka9q2ClIOMvE+BD E8kxKnPMs7Tn7LQDw+zbnbWFzs994WAME97BTCvCLntyzemYYL0kclQ5SrFAmRJyasoe UKClGp3yS4TSNzlpWQuJSHmK+8mcgrBng1zg2ShkBeO0JDXszsKDobFL30sqeiJ0QeD6 0dDFLInolz5INgnswRlxA7h+kIPCfTRh95I0+CKvPvdmux7YC/DVzPOxu0VsoeDb9rSp /U8UxptTtYQCC5AobLP7+OKuyxPI094qw5ki3s2WCj1GPKBfJ2H+ejFZJVnr+7I1OUWQ zgAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=sNq8+BmR; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k188si1922802oib.201.2019.12.10.08.42.51; Tue, 10 Dec 2019 08:43:07 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=sNq8+BmR; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727762AbfLJQmP (ORCPT + 99 others); Tue, 10 Dec 2019 11:42:15 -0500 Received: from mail-pg1-f195.google.com ([209.85.215.195]:32800 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727756AbfLJQmN (ORCPT ); Tue, 10 Dec 2019 11:42:13 -0500 Received: by mail-pg1-f195.google.com with SMTP id 6so9173608pgk.0; Tue, 10 Dec 2019 08:42:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KrHHV8WagrQw//LLkgB8ANSCBK2Q9bQ9Pa7bMN8q10Q=; b=sNq8+BmRFRIpUJlu7Y61TqM613g3/K9Xa44jR5RpgWtbW+U/9hu4ydJ1NmwezZK1E1 U+LVihdsXKe5IOaSX1+0wk2Do8WlQlspWMnh6jPkf6ThBlk0+i0eCBBVkYLH0gX+6Ess ZpoY2fopIkshVVjNnl9BGufqrK9SWARJLURBXxdsWgO8gQ3w2edeCjf7+EOffytsFIZC s6xa94kxIETdANklRB/MHmyUYL77K0re0+pDsnsYzRAKrQzbFNzyotODOi+OZ0HvRUJN 4RkA+gsSHnxev0R2feRBCbtPBaOwAYBAia4tDK5Txi+0W3EOYyhP3L1FNowZQIltwiT1 TWCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KrHHV8WagrQw//LLkgB8ANSCBK2Q9bQ9Pa7bMN8q10Q=; b=NuEs0C8ljkL6I/ulnVIvXkAgIggB+OsnSz+jhQGAe5SUpNx/VUIyG4xWgPyN04GKNi UfljwTODzXcNPgvQG/+LZIANrTW2+hcbWdSEzAwkM0s5XdN8ZHvi6WJ84+XJuVYn+pi5 ETbmweCq/OiNs2Q5L7nKAfDSdIcoaf/F5mjI5Tk1A0YpT66ctUkxcZ1HYJRVAnOklV5H P9b2Ulmiitf9YyVjvIr4DoqwOMWYGP8tVWw0pGSsnHCin2VinKUv9dhidbevDsV5jb+V EGjoz7QSqLjXeiXaaSS21IUVgmrUBI8XVWVYGpF6i6DmSHTCh8AB1W+ys1XOAP3a4/iQ 6UXQ== X-Gm-Message-State: APjAAAXZaTli3WckMbBvy6wN0Fa53HcElfvrJRtEkKd9HQ6JSwD0pJ8L epoP7ni+DW3KrhmJoPhX/VE= X-Received: by 2002:a63:fa04:: with SMTP id y4mr25730627pgh.413.1575996133176; Tue, 10 Dec 2019 08:42:13 -0800 (PST) Received: from localhost.localdomain (c-67-165-113-11.hsd1.wa.comcast.net. [67.165.113.11]) by smtp.gmail.com with ESMTPSA id j38sm4034634pgj.27.2019.12.10.08.42.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2019 08:42:11 -0800 (PST) From: Andrey Smirnov To: Daniel Lezcano Cc: Andrey Smirnov , Chris Healy , Lucas Stach , Zhang Rui , Eduardo Valentin , Angus Ainslie , linux-imx@nxp.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v8 03/12] thermal: qoriq: Add local struct qoriq_sensor pointer Date: Tue, 10 Dec 2019 08:41:44 -0800 Message-Id: <20191210164153.10463-4-andrew.smirnov@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191210164153.10463-1-andrew.smirnov@gmail.com> References: <20191210164153.10463-1-andrew.smirnov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add local struct qoriq_sensor pointer in qoriq_tmu_register_tmu_zone() for brevity. Signed-off-by: Andrey Smirnov Cc: Chris Healy Cc: Lucas Stach Cc: Zhang Rui Cc: Eduardo Valentin Cc: Daniel Lezcano Cc: Angus Ainslie (Purism) Cc: linux-imx@nxp.com Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- drivers/thermal/qoriq_thermal.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/thermal/qoriq_thermal.c b/drivers/thermal/qoriq_thermal.c index 2f2f5ffa8f26..61733d820e1b 100644 --- a/drivers/thermal/qoriq_thermal.c +++ b/drivers/thermal/qoriq_thermal.c @@ -162,18 +162,22 @@ static int qoriq_tmu_register_tmu_zone(struct platform_device *pdev) for (id = 0; id < SITES_MAX; id++) { struct thermal_zone_device *tzd; + struct qoriq_sensor *sensor; int ret; - qdata->sensor[id] = devm_kzalloc(&pdev->dev, - sizeof(struct qoriq_sensor), GFP_KERNEL); + sensor = devm_kzalloc(&pdev->dev, + sizeof(struct qoriq_sensor), + GFP_KERNEL); if (!qdata->sensor[id]) return -ENOMEM; - qdata->sensor[id]->id = id; - qdata->sensor[id]->qdata = qdata; + qdata->sensor[id] = sensor; + + sensor->id = id; + sensor->qdata = qdata; tzd = devm_thermal_zone_of_sensor_register(&pdev->dev, id, - qdata->sensor[id], + sensor, &tmu_tz_ops); ret = PTR_ERR_OR_ZERO(tzd); if (ret) { -- 2.21.0