|
@@ -535,13 +535,15 @@ static int acm_notify_serial_state(struct f_acm *acm)
|
|
{
|
|
{
|
|
struct usb_composite_dev *cdev = acm->port.func.config->cdev;
|
|
struct usb_composite_dev *cdev = acm->port.func.config->cdev;
|
|
int status;
|
|
int status;
|
|
|
|
+ __le16 serial_state;
|
|
|
|
|
|
spin_lock(&acm->lock);
|
|
spin_lock(&acm->lock);
|
|
if (acm->notify_req) {
|
|
if (acm->notify_req) {
|
|
dev_dbg(&cdev->gadget->dev, "acm ttyGS%d serial state %04x\n",
|
|
dev_dbg(&cdev->gadget->dev, "acm ttyGS%d serial state %04x\n",
|
|
acm->port_num, acm->serial_state);
|
|
acm->port_num, acm->serial_state);
|
|
|
|
+ serial_state = cpu_to_le16(acm->serial_state);
|
|
status = acm_cdc_notify(acm, USB_CDC_NOTIFY_SERIAL_STATE,
|
|
status = acm_cdc_notify(acm, USB_CDC_NOTIFY_SERIAL_STATE,
|
|
- 0, &acm->serial_state, sizeof(acm->serial_state));
|
|
|
|
|
|
+ 0, &serial_state, sizeof(acm->serial_state));
|
|
} else {
|
|
} else {
|
|
acm->pending = true;
|
|
acm->pending = true;
|
|
status = 0;
|
|
status = 0;
|