From nobody Fri Dec 19 12:01:45 2025 Received: from fgw20-7.mail.saunalahti.fi (fgw20-7.mail.saunalahti.fi [62.142.5.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0360318BB8A for ; Mon, 2 Sep 2024 22:29:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.142.5.81 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316156; cv=none; b=Z5I81pwPN6is33dFOY/uEu3n2vrxnVxqHWxHQ/5KUa8jVCaPqjOyQMGekhu8qxVQuCSRnnZDVuMLr4ajME+cTIVvUBLiKaClKFOfRah68Us8Te+c0Wvz0gv46b6T3Zd3BXQHMhm8TemF2BM8wM2MOlsJnmuQ0o+VpZdB+l7cfA0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725316156; c=relaxed/simple; bh=QWPgIRpwXymjEgzsDh0vqG0Bdp+osf8cuQX3gO2Y+Z8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=G7NuFUdryaLH3ksCnO3VFE7eQ3R+z5I82xB1/wTUyw/Lmb4yBLiE8uDTB67z9JPClL4t6K6X1dMrL/fEYKaStYg/f2U37tLKmGcGYxceDk2y/AOV3Hhr/9eWw41YtJ6qpbvrB4fyNxHm4pt9dH7LlAauwCdnem8H8lZpBWyJalc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com; spf=fail smtp.mailfrom=gmail.com; arc=none smtp.client-ip=62.142.5.81 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=gmail.com Received: from localhost (88-113-25-87.elisa-laajakaista.fi [88.113.25.87]) by fgw22.mail.saunalahti.fi (Halon) with ESMTP id b1ab8451-697a-11ef-8ecb-005056bdf889; Tue, 03 Sep 2024 01:28:36 +0300 (EEST) From: Andy Shevchenko To: Jonathan Cameron , David Lechner , Andy Shevchenko , Michael Hennerich , Antoniu Miclaus , Jinjie Ruan , Lorenzo Bianconi , Srinivas Pandruvada , Basavaraj Natikar , linux-input@vger.kernel.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jiri Kosina , Jonathan Cameron , Lars-Peter Clausen , Michael Hennerich , Andy Shevchenko Subject: [PATCH v1 10/22] iio: dac: max517: Get platform data via dev_get_platdata() Date: Tue, 3 Sep 2024 01:16:55 +0300 Message-ID: <20240902222824.1145571-11-andy.shevchenko@gmail.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240902222824.1145571-1-andy.shevchenko@gmail.com> References: <20240902222824.1145571-1-andy.shevchenko@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: quoted-printable Content-Type: text/plain; charset="utf-8" From: Andy Shevchenko Access to platform data via dev_get_platdata() getter to make code cleaner. Signed-off-by: Andy Shevchenko --- drivers/iio/dac/max517.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/dac/max517.c b/drivers/iio/dac/max517.c index 685980184d3c..96781ae04f9d 100644 --- a/drivers/iio/dac/max517.c +++ b/drivers/iio/dac/max517.c @@ -143,10 +143,10 @@ static const struct iio_chan_spec max517_channels[] = =3D { =20 static int max517_probe(struct i2c_client *client) { + const struct max517_platform_data *platform_data =3D dev_get_platdata(&cl= ient->dev); const struct i2c_device_id *id =3D i2c_client_get_device_id(client); struct max517_data *data; struct iio_dev *indio_dev; - struct max517_platform_data *platform_data =3D client->dev.platform_data; int chan; =20 indio_dev =3D devm_iio_device_alloc(&client->dev, sizeof(*data)); @@ -176,7 +176,7 @@ static int max517_probe(struct i2c_client *client) =20 /* * Reference voltage on MAX518 and default is 5V, else take vref_mv - * from platform_data + * from platform_data. */ for (chan =3D 0; chan < indio_dev->num_channels; chan++) { if (id->driver_data =3D=3D ID_MAX518 || !platform_data) --=20 2.46.0