Skip to content

Commit

Permalink
hso: rename hso_dev into serial in hso_free_interface()
Browse files Browse the repository at this point in the history
In other functions of the driver, variables of type "struct hso_serial"
are denoted by "serial" and variables of type "struct hso_device" are
denoted by "hso_dev". This patch makes the hso_free_interface()
consistent with these notations.

Signed-off-by: Olivier Sobrie <olivier@sobrie.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Olivier Sobrie authored and David S. Miller committed Feb 1, 2015
1 parent 7992767 commit f6516b6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions drivers/net/usb/hso.c
Original file line number Diff line number Diff line change
Expand Up @@ -3114,17 +3114,17 @@ static void hso_serial_ref_free(struct kref *ref)

static void hso_free_interface(struct usb_interface *interface)
{
struct hso_serial *hso_dev;
struct hso_serial *serial;
int i;

for (i = 0; i < HSO_SERIAL_TTY_MINORS; i++) {
if (serial_table[i] &&
(serial_table[i]->interface == interface)) {
hso_dev = dev2ser(serial_table[i]);
tty_port_tty_hangup(&hso_dev->port, false);
mutex_lock(&hso_dev->parent->mutex);
hso_dev->parent->usb_gone = 1;
mutex_unlock(&hso_dev->parent->mutex);
serial = dev2ser(serial_table[i]);
tty_port_tty_hangup(&serial->port, false);
mutex_lock(&serial->parent->mutex);
serial->parent->usb_gone = 1;
mutex_unlock(&serial->parent->mutex);
kref_put(&serial_table[i]->ref, hso_serial_ref_free);
}
}
Expand Down

0 comments on commit f6516b6

Please sign in to comment.