From: Hauke Mehrtens <hauke@hauke-m.de>
To: backports@vger.kernel.org
Cc: johannes@sipsolutions.net, Hauke Mehrtens <hauke@hauke-m.de>
Subject: [PATCH 7/9] backports: patches: avoid struct spi_delay usage
Date: Tue, 21 Apr 2020 00:16:13 +0200 [thread overview]
Message-ID: <20200420221615.14734-8-hauke@hauke-m.de> (raw)
In-Reply-To: <20200420221615.14734-1-hauke@hauke-m.de>
The struct spi_transfer got a new member "struct spi_delay delay" in
upstream commit bebcfd272df6 ("spi: introduce `delay` field for
`spi_transfer` + spi_transfer_delay_exec()"), use the older interface in
older kernel versions.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
patches/0095-spi-delay/libertas.patch | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
create mode 100644 patches/0095-spi-delay/libertas.patch
diff --git a/patches/0095-spi-delay/libertas.patch b/patches/0095-spi-delay/libertas.patch
new file mode 100644
index 00000000..4a4e59a1
--- /dev/null
+++ b/patches/0095-spi-delay/libertas.patch
@@ -0,0 +1,17 @@
+--- a/drivers/net/wireless/marvell/libertas/if_spi.c
++++ b/drivers/net/wireless/marvell/libertas/if_spi.c
+@@ -235,9 +235,14 @@ static int spu_read(struct if_spi_card *
+ spi_message_add_tail(&dummy_trans, &m);
+ } else {
+ /* Busy-wait while the SPU fills the FIFO */
++#if LINUX_VERSION_IS_GEQ(5,5,0)
+ reg_trans.delay.value =
+ DIV_ROUND_UP((100 + (delay * 10)), 1000);
+ reg_trans.delay.unit = SPI_DELAY_UNIT_USECS;
++#else
++ reg_trans.delay_usecs =
++ DIV_ROUND_UP((100 + (delay * 10)), 1000);
++#endif /* >= 5.5 */
+ }
+
+ /* read in data */
--
2.20.1
--
To unsubscribe from this list: send the line "unsubscribe backports" in
next prev parent reply other threads:[~2020-04-20 22:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-20 22:16 [PATCH 0/9] backports: Update to version 5.7-rc2 Hauke Mehrtens
2020-04-20 22:16 ` [PATCH 1/9] backports: Refresh patches on kernel 5.7-rc2 Hauke Mehrtens
2020-04-20 22:16 ` [PATCH 2/9] backports: pm_qos: Add cpu_latency_qos_* functions Hauke Mehrtens
2020-04-20 22:16 ` [PATCH 3/9] backports: genetlink: Add genlmsg_parse() Hauke Mehrtens
2020-04-20 22:16 ` [PATCH 4/9] backports: rculist: Add additional parameter to list_for_each_entry_rcu() Hauke Mehrtens
2020-04-20 22:16 ` [PATCH 5/9] backports: Add include/uapi/linux/virtio_ids.h Hauke Mehrtens
2020-04-20 22:16 ` [PATCH 6/9] backports: virtio_config: Add virtio_find_vqs() Hauke Mehrtens
2020-04-20 22:16 ` Hauke Mehrtens [this message]
2020-04-20 22:16 ` [PATCH 8/9] backports: patches: Avoid struct ethtool_ops.supported_coalesce_params Hauke Mehrtens
2020-04-20 22:16 ` [PATCH 9/9] backports: netdevice: Add netif_is_bridge_port() Hauke Mehrtens
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200420221615.14734-8-hauke@hauke-m.de \
--to=hauke@hauke-m.de \
--cc=backports@vger.kernel.org \
--cc=johannes@sipsolutions.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).