s2145: Don't bother looing up device subtype.
This commit is contained in:
parent
713d48ab1b
commit
d55adc475e
|
@ -97,7 +97,6 @@ struct shinkos2145_ctx {
|
|||
struct libusb_device_handle *dev;
|
||||
uint8_t endp_up;
|
||||
uint8_t endp_down;
|
||||
int type;
|
||||
|
||||
uint8_t jobid;
|
||||
|
||||
|
@ -1400,19 +1399,11 @@ static void shinkos2145_attach(void *vctx, struct libusb_device_handle *dev,
|
|||
uint8_t endp_up, uint8_t endp_down, uint8_t jobid)
|
||||
{
|
||||
struct shinkos2145_ctx *ctx = vctx;
|
||||
struct libusb_device *device;
|
||||
struct libusb_device_descriptor desc;
|
||||
|
||||
ctx->dev = dev;
|
||||
ctx->endp_up = endp_up;
|
||||
ctx->endp_down = endp_down;
|
||||
|
||||
device = libusb_get_device(dev);
|
||||
libusb_get_device_descriptor(device, &desc);
|
||||
|
||||
ctx->type = lookup_printer_type(&shinkos2145_backend,
|
||||
desc.idVendor, desc.idProduct);
|
||||
|
||||
/* Ensure jobid is sane */
|
||||
ctx->jobid = (jobid & 0x7f);
|
||||
if (!ctx->jobid)
|
||||
|
|
Loading…
Reference in New Issue