mct_u232.c (0337966d121ebebf73a1c346123e8112796e684e) mct_u232.c (26cede343656c0bc2c33cdc783771282405c7fb2)
1/*
2 * MCT (Magic Control Technology Corp.) USB RS232 Converter Driver
3 *
4 * Copyright (C) 2000 Wolfgang Grandegger (wolfgang@ces.ch)
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or

--- 175 unchanged lines hidden (view full) ---

184 unsigned char cts_enable_byte = 0;
185 speed_t speed;
186
187 buf = kmalloc(MCT_U232_MAX_SIZE, GFP_KERNEL);
188 if (buf == NULL)
189 return -ENOMEM;
190
191 divisor = mct_u232_calculate_baud_rate(serial, value, &speed);
1/*
2 * MCT (Magic Control Technology Corp.) USB RS232 Converter Driver
3 *
4 * Copyright (C) 2000 Wolfgang Grandegger (wolfgang@ces.ch)
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or

--- 175 unchanged lines hidden (view full) ---

184 unsigned char cts_enable_byte = 0;
185 speed_t speed;
186
187 buf = kmalloc(MCT_U232_MAX_SIZE, GFP_KERNEL);
188 if (buf == NULL)
189 return -ENOMEM;
190
191 divisor = mct_u232_calculate_baud_rate(serial, value, &speed);
192 put_unaligned_le32(cpu_to_le32(divisor), buf);
192 put_unaligned_le32(divisor, buf);
193 rc = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
194 MCT_U232_SET_BAUD_RATE_REQUEST,
195 MCT_U232_SET_REQUEST_TYPE,
196 0, 0, buf, MCT_U232_SET_BAUD_RATE_SIZE,
197 WDR_TIMEOUT);
198 if (rc < 0) /*FIXME: What value speed results */
199 dev_err(&port->dev, "Set BAUD RATE %d failed (error = %d)\n",
200 value, rc);

--- 582 unchanged lines hidden ---
193 rc = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
194 MCT_U232_SET_BAUD_RATE_REQUEST,
195 MCT_U232_SET_REQUEST_TYPE,
196 0, 0, buf, MCT_U232_SET_BAUD_RATE_SIZE,
197 WDR_TIMEOUT);
198 if (rc < 0) /*FIXME: What value speed results */
199 dev_err(&port->dev, "Set BAUD RATE %d failed (error = %d)\n",
200 value, rc);

--- 582 unchanged lines hidden ---