From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 754863A1682 for ; Sat, 9 May 2026 10:11:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778321483; cv=none; b=lNIen2ptgyUgUbxTFQ5Y6D4iAD/mEEjgaIu7Tpfx0KP6XZwxH6q9Nz8JOltqJ/r6iQnTbK1bKMc1whREHadDMQLRAIYXNEoevXvG2gaMwVvaL3Or6cls+dRwG5rM7z7KF8rO4Y378854MIQ4MfFq8uDbFJGFaiWr9tzOa4JPCDA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778321483; c=relaxed/simple; bh=VVbBRaPqNz0NXDuh6RaAIZv6l4EoKGyZf9pCIvkbudw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=FQPF65AwC6Fj3QERcWRdYHejw0fleoFm2iwgVm5fEvjznZcgu3kzT5+Yc1psLpf3x2MM8ps4KV1BFl+z4DDwVrWvHn4nyLKfKRE8i7UwzZ4pQWsDpbZapU8WF28QhRmJbQLaHPLrNVC3eKoaBiRJpse2Z31c3qXCdmmGnqiJAqo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ZapTjrsD; arc=none smtp.client-ip=209.85.214.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ZapTjrsD" Received: by mail-pl1-f170.google.com with SMTP id d9443c01a7336-2bc763e2ba8so2095445ad.3 for ; Sat, 09 May 2026 03:11:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1778321480; x=1778926280; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=gOWOLL+hb+19Lzkxv0p25XQnGbbiGbdMhzO7Q7xEcw8=; b=ZapTjrsDMGpXsHK31XNdtv5alGguGU5KzHo7JS/hwrG251F4O1ZjZooTfFDUAy4ZDq lLDnD/cshUVa5IO3o17lmwnwbl1A1tu/QxrCcSeFXt8oLLVEEoLNhvjBZ0uvDnHN4BXo dlTv+i26Y3EUfn7RM5tFc+5GySQ/kW+/qMUiXJiOFOwqXGXPnljeGLjtHC1QK4cSDNs4 MZLe0JEUznHzBtY3A50cHT4JyneD/S9+vo6D4MA0KZorumyi5qLV2/GW9DIwD24QZGyL JCYBraubpxjE68hxjg7araxEtI9lDq21gQ8EniUOvPsIaWPA6KX3fn5Y1aKgg1DTkO88 AwZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778321480; x=1778926280; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=gOWOLL+hb+19Lzkxv0p25XQnGbbiGbdMhzO7Q7xEcw8=; b=WrNkwizdQLsQIjmuUQNwlheK7aHYz/xt6gfPRKeuuvVWiXf1Ncboi7VytB+OtWoz7E BxRhr/9q7BbqUwDX4ARDJV3Bn6jOhJhGFplrDveos5UQZgn4UDZie2AvfRvV98TOY7Nl uZnEqUAIpHEBHXnJDRA7E6Yj99ve6Nqv147ttZ9np8l9t6x9FVCiszLlN0RJlA95OHRf kJCc9EApJ3rxOXDTxtTCm0myK5BkJQduregBdWjFDlDOHRLT22uRu3mMEt4wmAPgeI7V /85837NhqeFLHIbTaXjNRBSupZ1Jvf3lWrSYy1x/fm9peO0yQ24X7XxsE7EUjk58CLqx hIgw== X-Forwarded-Encrypted: i=1; AFNElJ8MgYtpE6Ro/Qs3tD5SpjigWXCsal6RxEVOURqAYmctMK3d0MIDVYmFrmIatSdhS8kI63cxfObo3+K2VK8=@vger.kernel.org X-Gm-Message-State: AOJu0YyU1r5myNZuTXApWRN1tJVjcdSYQ86YViMOWxLv8dea+fEHcw0W qJpVB4pNh0d2xqOelj6XditfmAIyu0xH/4hUmrvPgjt3laFdBUMjjomM X-Gm-Gg: Acq92OHzpFryuZPyWsSY13yGpCxC/VngpJMbWlS01OnhlbcoctK5KmkbPh2dGwgCLD/ i/U1b10fOLDzp2gsF/H6OD971FKMlM4S305iyJz4XGuZtqAP8Ajm3nuVEkVdtHmxaiwJzQDjxKr z5rhUQI06CPDlAyvA1gxYZKdHYUiQijGc57PRi3ClzXXtrjdfz/UhwWzJseXn0gtn+FIiookOr8 463LsO2bSnISw2bKn9Fw/m6mzm3ZwbQlkwdhhS8CTw5JaJn2C81+bEyWcYY84Fg51PSxbOiRsPd mfmyBquZ4Nyg+KADso8h2qwdvDiYKuQZeuEEzKDDcLjCl+Dd3LcxYx6O7K2yG5/xMsvtCHuSrev KY9Srte0fRhCuNJ3OSsst1MFglrdIlECDnLg1crt8LfpI1izhNgItPtAGJTtle0zkJLjpj/aA4W 65Ebbec5bSeEOoGHu1Fezm8KjFsBtPPV1RMrlsn66tFrH5RHtR X-Received: by 2002:a17:902:d2c7:b0:2ba:99a2:c44e with SMTP id d9443c01a7336-2ba99a2dcb2mr148253195ad.21.1778321479939; Sat, 09 May 2026 03:11:19 -0700 (PDT) Received: from hu-ckantibh-hyd.qualcomm.com ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2baf1e83084sm47335365ad.61.2026.05.09.03.11.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 May 2026 03:11:19 -0700 (PDT) From: Sanjay Chitroda X-Google-Original-From: Sanjay Chitroda To: jikos@kernel.org, jic23@kernel.org, srinivas.pandruvada@linux.intel.com Cc: dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org, sanjayembeddedse@gmail.com, sakari.ailus@linux.intel.com, linux-input@vger.kernel.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 8/9] iio: humidity: hid-sensor-humidity: use local struct device Date: Sat, 9 May 2026 15:40:39 +0530 Message-Id: <20260509101040.791404-9-sanjayembedded@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260509101040.791404-1-sanjayembedded@gmail.com> References: <20260509101040.791404-1-sanjayembedded@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Sanjay Chitroda Introduce a local struct device pointer derived from &pdev->dev. This avoids repeated &pdev->dev usage and improves readability. Signed-off-by: Sanjay Chitroda --- drivers/iio/humidity/hid-sensor-humidity.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/iio/humidity/hid-sensor-humidity.c b/drivers/iio/humidity/hid-sensor-humidity.c index 18d4e376376d..d310ec43a118 100644 --- a/drivers/iio/humidity/hid-sensor-humidity.c +++ b/drivers/iio/humidity/hid-sensor-humidity.c @@ -196,10 +196,11 @@ static int hid_humidity_probe(struct platform_device *pdev) struct iio_dev *indio_dev; struct hid_humidity_state *humid_st; struct iio_chan_spec *humid_chans; - struct hid_sensor_hub_device *hsdev = dev_get_platdata(&pdev->dev); + struct device *dev = &pdev->dev; + struct hid_sensor_hub_device *hsdev = dev_get_platdata(dev); int ret; - indio_dev = devm_iio_device_alloc(&pdev->dev, sizeof(*humid_st)); + indio_dev = devm_iio_device_alloc(dev, sizeof(*humid_st)); if (!indio_dev) return -ENOMEM; @@ -215,7 +216,7 @@ static int hid_humidity_probe(struct platform_device *pdev) if (ret) return ret; - humid_chans = devm_kmemdup(&pdev->dev, humidity_channels, + humid_chans = devm_kmemdup(dev, humidity_channels, sizeof(humidity_channels), GFP_KERNEL); if (!humid_chans) return -ENOMEM; -- 2.34.1