From: Johan Hovold <johan@kernel.org>
To: Johan Hovold <johan@kernel.org>
Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/4] USB: serial: drop unused suspending flag
Date: Tue, 30 Mar 2021 16:38:17 +0200 [thread overview]
Message-ID: <20210330143820.9103-2-johan@kernel.org> (raw)
In-Reply-To: <20210330143820.9103-1-johan@kernel.org>
The suspending flag was added back in 2009 but no users ever followed.
Remove it.
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/usb/serial/usb-serial.c | 8 +-------
include/linux/usb/serial.h | 1 -
2 files changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index 27e3bb58c872..2a38810a3979 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -1114,8 +1114,6 @@ int usb_serial_suspend(struct usb_interface *intf, pm_message_t message)
struct usb_serial *serial = usb_get_intfdata(intf);
int i, r = 0;
- serial->suspending = 1;
-
/*
* serial->type->suspend() MUST return 0 in system sleep context,
* otherwise, the resume callback has to recover device from
@@ -1123,10 +1121,8 @@ int usb_serial_suspend(struct usb_interface *intf, pm_message_t message)
*/
if (serial->type->suspend) {
r = serial->type->suspend(serial, message);
- if (r < 0) {
- serial->suspending = 0;
+ if (r < 0)
goto err_out;
- }
}
for (i = 0; i < serial->num_ports; ++i)
@@ -1151,7 +1147,6 @@ int usb_serial_resume(struct usb_interface *intf)
usb_serial_unpoison_port_urbs(serial);
- serial->suspending = 0;
if (serial->type->resume)
rv = serial->type->resume(serial);
else
@@ -1168,7 +1163,6 @@ static int usb_serial_reset_resume(struct usb_interface *intf)
usb_serial_unpoison_port_urbs(serial);
- serial->suspending = 0;
if (serial->type->reset_resume) {
rv = serial->type->reset_resume(serial);
} else {
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h
index 952272002e48..7efba6caaadc 100644
--- a/include/linux/usb/serial.h
+++ b/include/linux/usb/serial.h
@@ -146,7 +146,6 @@ struct usb_serial {
struct usb_serial_driver *type;
struct usb_interface *interface;
unsigned char disconnected:1;
- unsigned char suspending:1;
unsigned char attached:1;
unsigned char minors_reserved:1;
unsigned char num_ports;
--
2.26.3
next prev parent reply other threads:[~2021-03-30 14:38 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-30 14:38 [PATCH 0/4] USB: serial: add support for multi-interface functions Johan Hovold
2021-03-30 14:38 ` Johan Hovold [this message]
2021-03-30 14:38 ` [PATCH 2/4] USB: serial: refactor endpoint classification Johan Hovold
2021-03-30 14:38 ` [PATCH 3/4] USB: serial: add support for multi-interface functions Johan Hovold
2021-03-30 14:44 ` Oliver Neukum
2021-03-30 15:22 ` Johan Hovold
2021-03-31 7:08 ` Oliver Neukum
2021-03-31 11:21 ` Oliver Neukum
2021-04-01 7:46 ` Johan Hovold
2021-04-08 10:10 ` Oliver Neukum
2021-03-30 14:38 ` [PATCH 4/4] USB: serial: xr: claim both interfaces Johan Hovold
2021-03-30 14:50 ` [PATCH 0/4] USB: serial: add support for multi-interface functions Greg KH
2021-04-01 8:09 ` Johan Hovold
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=20210330143820.9103-2-johan@kernel.org \
--to=johan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mchehab+huawei@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.