From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 A4C8C1C29 for ; Wed, 23 Nov 2022 09:36:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 239B7C433D6; Wed, 23 Nov 2022 09:36:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1669196169; bh=u/s33k08WmlBc5YODo+KAW2RhSMTD8O4/IU91YQ1fJw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ll9cTrOUR4bZOj1G4JZu2wyiyMFRUHEFKd+3fWQ6s4RfFuprir5/rewVjMN4O9Z0r mhPZksm6qsJnlTwHrX7jXkev8Fr7FDw/cd76diz9DLPtRMwgTVaBzpDQSI+ADYWJSB grcxdONA6r/mCVo61YRR1hTmoSBQyvE1jXcl6vQI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Mitja Spes , Stable@vger.kernel.org, Jonathan Cameron Subject: [PATCH 5.15 139/181] iio: pressure: ms5611: changed hardcoded SPI speed to value limited Date: Wed, 23 Nov 2022 09:51:42 +0100 Message-Id: <20221123084608.355569663@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221123084602.707860461@linuxfoundation.org> References: <20221123084602.707860461@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Mitja Spes commit 741cec30cc52058d1c10d415f3b98319887e4f73 upstream. Don't hardcode the ms5611 SPI speed, limit it instead. Signed-off-by: Mitja Spes Fixes: c0644160a8b5 ("iio: pressure: add support for MS5611 pressure and temperature sensor") Link: https://lore.kernel.org/r/20221021135827.1444793-3-mitja@lxnav.com Cc: Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/iio/pressure/ms5611_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/iio/pressure/ms5611_spi.c +++ b/drivers/iio/pressure/ms5611_spi.c @@ -94,7 +94,7 @@ static int ms5611_spi_probe(struct spi_d spi_set_drvdata(spi, indio_dev); spi->mode = SPI_MODE_0; - spi->max_speed_hz = 20000000; + spi->max_speed_hz = min(spi->max_speed_hz, 20000000U); spi->bits_per_word = 8; ret = spi_setup(spi); if (ret < 0)