Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1256309 > unrolled thread
| Started by | Bogicevic Sasa <brutallesale@gmail.com> |
|---|---|
| First post | 2015-10-26 22:50 +0100 |
| Last post | 2015-10-27 09:20 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH 2/2] Drivers:staging:wlan_ng: fix all coding style isuues in file prism2usb.c Bogicevic Sasa <brutallesale@gmail.com> - 2015-10-26 22:50 +0100
Re: [PATCH 2/2] Drivers:staging:wlan_ng: fix all coding style isuues in file prism2usb.c Greg KH <gregkh@linuxfoundation.org> - 2015-10-27 09:20 +0100
| From | Bogicevic Sasa <brutallesale@gmail.com> |
|---|---|
| Date | 2015-10-26 22:50 +0100 |
| Subject | [PATCH 2/2] Drivers:staging:wlan_ng: fix all coding style isuues in file prism2usb.c |
| Message-ID | <qnXOr-526-31@gated-at.bofh.it> |
Fixed all coding style issues based on checkpatch.pl warnings and errors
Signed-off-by: Bogicevic Sasa <brutallesale@gmail.com>
---
drivers/staging/wlan-ng/prism2usb.c | 40 ++++++++++++++++++++++---------------
1 file changed, 24 insertions(+), 16 deletions(-)
diff --git a/drivers/staging/wlan-ng/prism2usb.c b/drivers/staging/wlan-ng/prism2usb.c
index e92bbc1..816d7e0 100644
--- a/drivers/staging/wlan-ng/prism2usb.c
+++ b/drivers/staging/wlan-ng/prism2usb.c
@@ -6,7 +6,7 @@
#define PRISM_DEV(vid, pid, name) \
{ USB_DEVICE(vid, pid), \
- .driver_info = (unsigned long) name }
+ .driver_info = (unsigned long)name }
static struct usb_device_id usb_prism_tbl[] = {
PRISM_DEV(0x04bb, 0x0922, "IOData AirPort WN-B11/USBS"),
@@ -46,12 +46,18 @@ static struct usb_device_id usb_prism_tbl[] = {
PRISM_DEV(0x124a, 0x4017, "Pheenet WL-503IA 802.11b USB Adapter"),
PRISM_DEV(0x0bb2, 0x0302, "Ambit Microsystems Corp."),
PRISM_DEV(0x9016, 0x182d, "Sitecom WL-022 802.11b USB Adapter"),
- PRISM_DEV(0x0543, 0x0f01,
- "ViewSonic Airsync USB Adapter 11Mbps (Prism2.5)"),
- PRISM_DEV(0x067c, 0x1022,
- "Siemens SpeedStream 1022 11Mbps WLAN USB Adapter"),
- PRISM_DEV(0x049f, 0x0033,
- "Compaq/Intel W100 PRO/Wireless 11Mbps multiport WLAN Adapter"),
+ PRISM_DEV(
+ 0x0543, 0x0f01,
+ "ViewSonic Airsync USB Adapter 11Mbps (Prism2.5)"
+ ),
+ PRISM_DEV(
+ 0x067c, 0x1022,
+ "Siemens SpeedStream 1022 11Mbps WLAN USB Adapter"
+ ),
+ PRISM_DEV(
+ 0x049f, 0x0033,
+ "Compaq/Intel W100 PRO/Wireless 11Mbps multiport WLAN Adapter"
+ ),
{ } /* terminator */
};
MODULE_DEVICE_TABLE(usb, usb_prism_tbl);
@@ -67,14 +73,14 @@ static int prism2sta_probe_usb(struct usb_interface *interface,
dev = interface_to_usbdev(interface);
wlandev = create_wlan();
- if (wlandev == NULL) {
+ if (!wlandev) {
dev_err(&interface->dev, "Memory allocation failure.\n");
result = -EIO;
goto failed;
}
hw = wlandev->priv;
- if (wlan_setup(wlandev, &(interface->dev)) != 0) {
+ if (wlan_setup(wlandev, &interface->dev) != 0) {
dev_err(&interface->dev, "wlan_setup() failed.\n");
result = -EIO;
goto failed;
@@ -87,7 +93,7 @@ static int prism2sta_probe_usb(struct usb_interface *interface,
/* Register the wlandev, this gets us a name and registers the
* linux netdevice.
*/
- SET_NETDEV_DEV(wlandev->netdev, &(interface->dev));
+ SET_NETDEV_DEV(wlandev->netdev, &interface->dev);
/* Do a chip-level reset on the MAC */
if (prism2_doreset) {
@@ -136,8 +142,8 @@ static void prism2sta_disconnect_usb(struct usb_interface *interface)
{
wlandevice_t *wlandev;
- wlandev = (wlandevice_t *) usb_get_intfdata(interface);
- if (wlandev != NULL) {
+ wlandev = (wlandevice_t *)usb_get_intfdata(interface);
+ if (!wlandev) {
LIST_HEAD(cleanlist);
struct list_head *entry;
struct list_head *temp;
@@ -223,13 +229,15 @@ exit:
}
#ifdef CONFIG_PM
-static int prism2sta_suspend(struct usb_interface *interface,
- pm_message_t message)
+static int prism2sta_suspend(
+ struct usb_interface *interface,
+ pm_message_t message
+ )
{
hfa384x_t *hw = NULL;
wlandevice_t *wlandev;
- wlandev = (wlandevice_t *) usb_get_intfdata(interface);
+ wlandev = (wlandevice_t *)usb_get_intfdata(interface);
if (!wlandev)
return -ENODEV;
@@ -252,7 +260,7 @@ static int prism2sta_resume(struct usb_interface *interface)
hfa384x_t *hw = NULL;
wlandevice_t *wlandev;
- wlandev = (wlandevice_t *) usb_get_intfdata(interface);
+ wlandev = (wlandevice_t *)usb_get_intfdata(interface);
if (!wlandev)
return -ENODEV;
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Greg KH <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2015-10-27 09:20 +0100 |
| Subject | Re: [PATCH 2/2] Drivers:staging:wlan_ng: fix all coding style isuues in file prism2usb.c |
| Message-ID | <qo7E7-2QQ-13@gated-at.bofh.it> |
| In reply to | #1256309 |
On Mon, Oct 26, 2015 at 10:47:37PM +0100, Bogicevic Sasa wrote: > Fixed all coding style issues based on checkpatch.pl warnings and errors > > Signed-off-by: Bogicevic Sasa <brutallesale@gmail.com> > --- > drivers/staging/wlan-ng/prism2usb.c | 40 ++++++++++++++++++++++--------------- > 1 file changed, 24 insertions(+), 16 deletions(-) Again, please break up. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web