From: Tim Collier <osdevtc@gmail.com>
To: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org
Subject: [PATCH 1/5] staging: wlan-ng: remove unnecessary casts from prism2usb.c
Date: Fri, 25 Oct 2019 09:41:22 +0100 [thread overview]
Message-ID: <20191025084126.9181-2-osdevtc@gmail.com> (raw)
In-Reply-To: <20191025084126.9181-1-osdevtc@gmail.com>
usb_get_intfdata returns a void pointer. It is not necessary to
explicitly cast to the desired type and removing the casts is
consistent with most use of usb_get_intfdata.
Signed-off-by: Tim Collier <osdevtc@gmail.com>
---
drivers/staging/wlan-ng/prism2usb.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/wlan-ng/prism2usb.c b/drivers/staging/wlan-ng/prism2usb.c
index b5ba176004c1..352556f6870a 100644
--- a/drivers/staging/wlan-ng/prism2usb.c
+++ b/drivers/staging/wlan-ng/prism2usb.c
@@ -137,7 +137,7 @@ static void prism2sta_disconnect_usb(struct usb_interface *interface)
{
struct wlandevice *wlandev;
- wlandev = (struct wlandevice *)usb_get_intfdata(interface);
+ wlandev = usb_get_intfdata(interface);
if (wlandev) {
LIST_HEAD(cleanlist);
struct hfa384x_usbctlx *ctlx, *temp;
@@ -222,7 +222,7 @@ static int prism2sta_suspend(struct usb_interface *interface,
struct hfa384x *hw = NULL;
struct wlandevice *wlandev;
- wlandev = (struct wlandevice *)usb_get_intfdata(interface);
+ wlandev = usb_get_intfdata(interface);
if (!wlandev)
return -ENODEV;
@@ -245,7 +245,7 @@ static int prism2sta_resume(struct usb_interface *interface)
struct hfa384x *hw = NULL;
struct wlandevice *wlandev;
- wlandev = (struct wlandevice *)usb_get_intfdata(interface);
+ wlandev = usb_get_intfdata(interface);
if (!wlandev)
return -ENODEV;
--
2.21.0
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
next prev parent reply other threads:[~2019-10-25 8:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-25 8:41 [PATCH 0/5] staging: wlang-ng: coding style changes/cleanups Tim Collier
2019-10-25 8:41 ` Tim Collier [this message]
2019-10-25 8:41 ` [PATCH 2/5] staging: wlan-ng: shorten lines over 80 characters in hfa384x.h Tim Collier
2019-10-25 8:41 ` [PATCH 3/5] staging: wlan-ng: correct parameter alignment " Tim Collier
2019-10-25 8:41 ` [PATCH 4/5] staging: wlan-ng: fix compilation for USB debugging Tim Collier
2019-10-25 8:41 ` [PATCH 5/5] staging: wlan-ng: remove unused field from struct hfa384x_usbctlx Tim Collier
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=20191025084126.9181-2-osdevtc@gmail.com \
--to=osdevtc@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
/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).