ar2 228 drivers/input/misc/ati_remote2.c static int ati_remote2_submit_urbs(struct ati_remote2 *ar2) ar2 232 drivers/input/misc/ati_remote2.c r = usb_submit_urb(ar2->urb[0], GFP_KERNEL); ar2 234 drivers/input/misc/ati_remote2.c dev_err(&ar2->intf[0]->dev, ar2 238 drivers/input/misc/ati_remote2.c r = usb_submit_urb(ar2->urb[1], GFP_KERNEL); ar2 240 drivers/input/misc/ati_remote2.c usb_kill_urb(ar2->urb[0]); ar2 241 drivers/input/misc/ati_remote2.c dev_err(&ar2->intf[1]->dev, ar2 249 drivers/input/misc/ati_remote2.c static void ati_remote2_kill_urbs(struct ati_remote2 *ar2) ar2 251 drivers/input/misc/ati_remote2.c usb_kill_urb(ar2->urb[1]); ar2 252 drivers/input/misc/ati_remote2.c usb_kill_urb(ar2->urb[0]); ar2 257 drivers/input/misc/ati_remote2.c struct ati_remote2 *ar2 = input_get_drvdata(idev); ar2 260 drivers/input/misc/ati_remote2.c dev_dbg(&ar2->intf[0]->dev, "%s()\n", __func__); ar2 262 drivers/input/misc/ati_remote2.c r = usb_autopm_get_interface(ar2->intf[0]); ar2 264 drivers/input/misc/ati_remote2.c dev_err(&ar2->intf[0]->dev, ar2 271 drivers/input/misc/ati_remote2.c if (!(ar2->flags & ATI_REMOTE2_SUSPENDED)) { ar2 272 drivers/input/misc/ati_remote2.c r = ati_remote2_submit_urbs(ar2); ar2 277 drivers/input/misc/ati_remote2.c ar2->flags |= ATI_REMOTE2_OPENED; ar2 281 drivers/input/misc/ati_remote2.c usb_autopm_put_interface(ar2->intf[0]); ar2 287 drivers/input/misc/ati_remote2.c usb_autopm_put_interface(ar2->intf[0]); ar2 294 drivers/input/misc/ati_remote2.c struct ati_remote2 *ar2 = input_get_drvdata(idev); ar2 296 drivers/input/misc/ati_remote2.c dev_dbg(&ar2->intf[0]->dev, "%s()\n", __func__); ar2 300 drivers/input/misc/ati_remote2.c if (!(ar2->flags & ATI_REMOTE2_SUSPENDED)) ar2 301 drivers/input/misc/ati_remote2.c ati_remote2_kill_urbs(ar2); ar2 303 drivers/input/misc/ati_remote2.c ar2->flags &= ~ATI_REMOTE2_OPENED; ar2 308 drivers/input/misc/ati_remote2.c static void ati_remote2_input_mouse(struct ati_remote2 *ar2) ar2 310 drivers/input/misc/ati_remote2.c struct input_dev *idev = ar2->idev; ar2 311 drivers/input/misc/ati_remote2.c u8 *data = ar2->buf[0]; ar2 316 drivers/input/misc/ati_remote2.c if (!((1 << channel) & ar2->channel_mask)) ar2 322 drivers/input/misc/ati_remote2.c dev_err(&ar2->intf[0]->dev, ar2 328 drivers/input/misc/ati_remote2.c if (!((1 << mode) & ar2->mode_mask)) ar2 347 drivers/input/misc/ati_remote2.c static void ati_remote2_input_key(struct ati_remote2 *ar2) ar2 349 drivers/input/misc/ati_remote2.c struct input_dev *idev = ar2->idev; ar2 350 drivers/input/misc/ati_remote2.c u8 *data = ar2->buf[1]; ar2 355 drivers/input/misc/ati_remote2.c if (!((1 << channel) & ar2->channel_mask)) ar2 361 drivers/input/misc/ati_remote2.c dev_err(&ar2->intf[1]->dev, ar2 376 drivers/input/misc/ati_remote2.c if (ar2->mode == mode) ar2 380 drivers/input/misc/ati_remote2.c ar2->mode = mode; ar2 383 drivers/input/misc/ati_remote2.c if (!((1 << mode) & ar2->mode_mask)) ar2 388 drivers/input/misc/ati_remote2.c dev_err(&ar2->intf[1]->dev, ar2 398 drivers/input/misc/ati_remote2.c ar2->jiffies = jiffies + msecs_to_jiffies(idev->rep[REP_DELAY]); ar2 403 drivers/input/misc/ati_remote2.c if (ar2->keycode[mode][index] == BTN_LEFT || ar2 404 drivers/input/misc/ati_remote2.c ar2->keycode[mode][index] == BTN_RIGHT) ar2 407 drivers/input/misc/ati_remote2.c if (!time_after_eq(jiffies, ar2->jiffies)) ar2 410 drivers/input/misc/ati_remote2.c ar2->jiffies = jiffies + msecs_to_jiffies(idev->rep[REP_PERIOD]); ar2 413 drivers/input/misc/ati_remote2.c dev_err(&ar2->intf[1]->dev, ar2 419 drivers/input/misc/ati_remote2.c input_event(idev, EV_KEY, ar2->keycode[mode][index], data[1]); ar2 425 drivers/input/misc/ati_remote2.c struct ati_remote2 *ar2 = urb->context; ar2 430 drivers/input/misc/ati_remote2.c usb_mark_last_busy(ar2->udev); ar2 431 drivers/input/misc/ati_remote2.c ati_remote2_input_mouse(ar2); ar2 437 drivers/input/misc/ati_remote2.c dev_dbg(&ar2->intf[0]->dev, ar2 441 drivers/input/misc/ati_remote2.c usb_mark_last_busy(ar2->udev); ar2 442 drivers/input/misc/ati_remote2.c dev_err(&ar2->intf[0]->dev, ar2 448 drivers/input/misc/ati_remote2.c dev_err(&ar2->intf[0]->dev, ar2 454 drivers/input/misc/ati_remote2.c struct ati_remote2 *ar2 = urb->context; ar2 459 drivers/input/misc/ati_remote2.c usb_mark_last_busy(ar2->udev); ar2 460 drivers/input/misc/ati_remote2.c ati_remote2_input_key(ar2); ar2 466 drivers/input/misc/ati_remote2.c dev_dbg(&ar2->intf[1]->dev, ar2 470 drivers/input/misc/ati_remote2.c usb_mark_last_busy(ar2->udev); ar2 471 drivers/input/misc/ati_remote2.c dev_err(&ar2->intf[1]->dev, ar2 477 drivers/input/misc/ati_remote2.c dev_err(&ar2->intf[1]->dev, ar2 484 drivers/input/misc/ati_remote2.c struct ati_remote2 *ar2 = input_get_drvdata(idev); ar2 514 drivers/input/misc/ati_remote2.c ke->keycode = ar2->keycode[mode][offset]; ar2 526 drivers/input/misc/ati_remote2.c struct ati_remote2 *ar2 = input_get_drvdata(idev); ar2 552 drivers/input/misc/ati_remote2.c *old_keycode = ar2->keycode[mode][offset]; ar2 553 drivers/input/misc/ati_remote2.c ar2->keycode[mode][offset] = ke->keycode; ar2 558 drivers/input/misc/ati_remote2.c if (ar2->keycode[mode][index] == *old_keycode) ar2 568 drivers/input/misc/ati_remote2.c static int ati_remote2_input_init(struct ati_remote2 *ar2) ar2 577 drivers/input/misc/ati_remote2.c ar2->idev = idev; ar2 578 drivers/input/misc/ati_remote2.c input_set_drvdata(idev, ar2); ar2 587 drivers/input/misc/ati_remote2.c ar2->keycode[mode][index] = ati_remote2_key_table[index].keycode; ar2 588 drivers/input/misc/ati_remote2.c __set_bit(ar2->keycode[mode][index], idev->keybit); ar2 594 drivers/input/misc/ati_remote2.c ar2->keycode[ATI_REMOTE2_AUX1][index] = KEY_PROG1; ar2 595 drivers/input/misc/ati_remote2.c ar2->keycode[ATI_REMOTE2_AUX2][index] = KEY_PROG2; ar2 596 drivers/input/misc/ati_remote2.c ar2->keycode[ATI_REMOTE2_AUX3][index] = KEY_PROG3; ar2 597 drivers/input/misc/ati_remote2.c ar2->keycode[ATI_REMOTE2_AUX4][index] = KEY_PROG4; ar2 598 drivers/input/misc/ati_remote2.c ar2->keycode[ATI_REMOTE2_PC][index] = KEY_PC; ar2 614 drivers/input/misc/ati_remote2.c idev->name = ar2->name; ar2 615 drivers/input/misc/ati_remote2.c idev->phys = ar2->phys; ar2 617 drivers/input/misc/ati_remote2.c usb_to_input_id(ar2->udev, &idev->id); ar2 618 drivers/input/misc/ati_remote2.c idev->dev.parent = &ar2->udev->dev; ar2 627 drivers/input/misc/ati_remote2.c static int ati_remote2_urb_init(struct ati_remote2 *ar2) ar2 629 drivers/input/misc/ati_remote2.c struct usb_device *udev = ar2->udev; ar2 633 drivers/input/misc/ati_remote2.c ar2->buf[i] = usb_alloc_coherent(udev, 4, GFP_KERNEL, &ar2->buf_dma[i]); ar2 634 drivers/input/misc/ati_remote2.c if (!ar2->buf[i]) ar2 637 drivers/input/misc/ati_remote2.c ar2->urb[i] = usb_alloc_urb(0, GFP_KERNEL); ar2 638 drivers/input/misc/ati_remote2.c if (!ar2->urb[i]) ar2 641 drivers/input/misc/ati_remote2.c pipe = usb_rcvintpipe(udev, ar2->ep[i]->bEndpointAddress); ar2 645 drivers/input/misc/ati_remote2.c usb_fill_int_urb(ar2->urb[i], udev, pipe, ar2->buf[i], maxp, ar2 647 drivers/input/misc/ati_remote2.c ar2, ar2->ep[i]->bInterval); ar2 648 drivers/input/misc/ati_remote2.c ar2->urb[i]->transfer_dma = ar2->buf_dma[i]; ar2 649 drivers/input/misc/ati_remote2.c ar2->urb[i]->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; ar2 655 drivers/input/misc/ati_remote2.c static void ati_remote2_urb_cleanup(struct ati_remote2 *ar2) ar2 660 drivers/input/misc/ati_remote2.c usb_free_urb(ar2->urb[i]); ar2 661 drivers/input/misc/ati_remote2.c usb_free_coherent(ar2->udev, 4, ar2->buf[i], ar2->buf_dma[i]); ar2 665 drivers/input/misc/ati_remote2.c static int ati_remote2_setup(struct ati_remote2 *ar2, unsigned int ch_mask) ar2 687 drivers/input/misc/ati_remote2.c r = usb_control_msg(ar2->udev, usb_sndctrlpipe(ar2->udev, 0), ar2 692 drivers/input/misc/ati_remote2.c dev_err(&ar2->udev->dev, "%s - failed to set channel due to error: %d\n", ar2 706 drivers/input/misc/ati_remote2.c struct ati_remote2 *ar2 = usb_get_intfdata(intf); ar2 708 drivers/input/misc/ati_remote2.c return sprintf(buf, "0x%04x\n", ar2->channel_mask); ar2 717 drivers/input/misc/ati_remote2.c struct ati_remote2 *ar2 = usb_get_intfdata(intf); ar2 728 drivers/input/misc/ati_remote2.c r = usb_autopm_get_interface(ar2->intf[0]); ar2 730 drivers/input/misc/ati_remote2.c dev_err(&ar2->intf[0]->dev, ar2 737 drivers/input/misc/ati_remote2.c if (mask != ar2->channel_mask) { ar2 738 drivers/input/misc/ati_remote2.c r = ati_remote2_setup(ar2, mask); ar2 740 drivers/input/misc/ati_remote2.c ar2->channel_mask = mask; ar2 745 drivers/input/misc/ati_remote2.c usb_autopm_put_interface(ar2->intf[0]); ar2 756 drivers/input/misc/ati_remote2.c struct ati_remote2 *ar2 = usb_get_intfdata(intf); ar2 758 drivers/input/misc/ati_remote2.c return sprintf(buf, "0x%02x\n", ar2->mode_mask); ar2 767 drivers/input/misc/ati_remote2.c struct ati_remote2 *ar2 = usb_get_intfdata(intf); ar2 778 drivers/input/misc/ati_remote2.c ar2->mode_mask = mask; ar2 803 drivers/input/misc/ati_remote2.c struct ati_remote2 *ar2; ar2 809 drivers/input/misc/ati_remote2.c ar2 = kzalloc(sizeof (struct ati_remote2), GFP_KERNEL); ar2 810 drivers/input/misc/ati_remote2.c if (!ar2) ar2 813 drivers/input/misc/ati_remote2.c ar2->udev = udev; ar2 822 drivers/input/misc/ati_remote2.c ar2->intf[0] = interface; ar2 823 drivers/input/misc/ati_remote2.c ar2->ep[0] = &alt->endpoint[0].desc; ar2 826 drivers/input/misc/ati_remote2.c ar2->intf[1] = usb_ifnum_to_if(udev, 1); ar2 827 drivers/input/misc/ati_remote2.c if ((udev->actconfig->desc.bNumInterfaces < 2) || !ar2->intf[1]) { ar2 834 drivers/input/misc/ati_remote2.c r = usb_driver_claim_interface(&ati_remote2_driver, ar2->intf[1], ar2); ar2 839 drivers/input/misc/ati_remote2.c alt = ar2->intf[1]->cur_altsetting; ar2 846 drivers/input/misc/ati_remote2.c ar2->ep[1] = &alt->endpoint[0].desc; ar2 848 drivers/input/misc/ati_remote2.c r = ati_remote2_urb_init(ar2); ar2 852 drivers/input/misc/ati_remote2.c ar2->channel_mask = channel_mask; ar2 853 drivers/input/misc/ati_remote2.c ar2->mode_mask = mode_mask; ar2 855 drivers/input/misc/ati_remote2.c r = ati_remote2_setup(ar2, ar2->channel_mask); ar2 859 drivers/input/misc/ati_remote2.c usb_make_path(udev, ar2->phys, sizeof(ar2->phys)); ar2 860 drivers/input/misc/ati_remote2.c strlcat(ar2->phys, "/input0", sizeof(ar2->phys)); ar2 862 drivers/input/misc/ati_remote2.c strlcat(ar2->name, "ATI Remote Wonder II", sizeof(ar2->name)); ar2 868 drivers/input/misc/ati_remote2.c r = ati_remote2_input_init(ar2); ar2 872 drivers/input/misc/ati_remote2.c usb_set_intfdata(interface, ar2); ar2 881 drivers/input/misc/ati_remote2.c ati_remote2_urb_cleanup(ar2); ar2 883 drivers/input/misc/ati_remote2.c usb_driver_release_interface(&ati_remote2_driver, ar2->intf[1]); ar2 885 drivers/input/misc/ati_remote2.c kfree(ar2); ar2 892 drivers/input/misc/ati_remote2.c struct ati_remote2 *ar2; ar2 898 drivers/input/misc/ati_remote2.c ar2 = usb_get_intfdata(interface); ar2 901 drivers/input/misc/ati_remote2.c input_unregister_device(ar2->idev); ar2 903 drivers/input/misc/ati_remote2.c sysfs_remove_group(&ar2->udev->dev.kobj, &ati_remote2_attr_group); ar2 905 drivers/input/misc/ati_remote2.c ati_remote2_urb_cleanup(ar2); ar2 907 drivers/input/misc/ati_remote2.c usb_driver_release_interface(&ati_remote2_driver, ar2->intf[1]); ar2 909 drivers/input/misc/ati_remote2.c kfree(ar2); ar2 915 drivers/input/misc/ati_remote2.c struct ati_remote2 *ar2; ar2 921 drivers/input/misc/ati_remote2.c ar2 = usb_get_intfdata(interface); ar2 923 drivers/input/misc/ati_remote2.c dev_dbg(&ar2->intf[0]->dev, "%s()\n", __func__); ar2 927 drivers/input/misc/ati_remote2.c if (ar2->flags & ATI_REMOTE2_OPENED) ar2 928 drivers/input/misc/ati_remote2.c ati_remote2_kill_urbs(ar2); ar2 930 drivers/input/misc/ati_remote2.c ar2->flags |= ATI_REMOTE2_SUSPENDED; ar2 939 drivers/input/misc/ati_remote2.c struct ati_remote2 *ar2; ar2 946 drivers/input/misc/ati_remote2.c ar2 = usb_get_intfdata(interface); ar2 948 drivers/input/misc/ati_remote2.c dev_dbg(&ar2->intf[0]->dev, "%s()\n", __func__); ar2 952 drivers/input/misc/ati_remote2.c if (ar2->flags & ATI_REMOTE2_OPENED) ar2 953 drivers/input/misc/ati_remote2.c r = ati_remote2_submit_urbs(ar2); ar2 956 drivers/input/misc/ati_remote2.c ar2->flags &= ~ATI_REMOTE2_SUSPENDED; ar2 965 drivers/input/misc/ati_remote2.c struct ati_remote2 *ar2; ar2 972 drivers/input/misc/ati_remote2.c ar2 = usb_get_intfdata(interface); ar2 974 drivers/input/misc/ati_remote2.c dev_dbg(&ar2->intf[0]->dev, "%s()\n", __func__); ar2 978 drivers/input/misc/ati_remote2.c r = ati_remote2_setup(ar2, ar2->channel_mask); ar2 982 drivers/input/misc/ati_remote2.c if (ar2->flags & ATI_REMOTE2_OPENED) ar2 983 drivers/input/misc/ati_remote2.c r = ati_remote2_submit_urbs(ar2); ar2 986 drivers/input/misc/ati_remote2.c ar2->flags &= ~ATI_REMOTE2_SUSPENDED; ar2 996 drivers/input/misc/ati_remote2.c struct ati_remote2 *ar2; ar2 1002 drivers/input/misc/ati_remote2.c ar2 = usb_get_intfdata(interface); ar2 1004 drivers/input/misc/ati_remote2.c dev_dbg(&ar2->intf[0]->dev, "%s()\n", __func__); ar2 1008 drivers/input/misc/ati_remote2.c if (ar2->flags == ATI_REMOTE2_OPENED) ar2 1009 drivers/input/misc/ati_remote2.c ati_remote2_kill_urbs(ar2); ar2 1016 drivers/input/misc/ati_remote2.c struct ati_remote2 *ar2; ar2 1023 drivers/input/misc/ati_remote2.c ar2 = usb_get_intfdata(interface); ar2 1025 drivers/input/misc/ati_remote2.c dev_dbg(&ar2->intf[0]->dev, "%s()\n", __func__); ar2 1027 drivers/input/misc/ati_remote2.c if (ar2->flags == ATI_REMOTE2_OPENED) ar2 1028 drivers/input/misc/ati_remote2.c r = ati_remote2_submit_urbs(ar2); ar2 416 drivers/net/wireless/st/cw1200/fwio.c u32 ar1, ar2, ar3; ar2 422 drivers/net/wireless/st/cw1200/fwio.c ret = cw1200_ahb_read_32(priv, CW1200_CUT2_ID_ADDR + 4, &ar2); ar2 435 drivers/net/wireless/st/cw1200/fwio.c ar2 == CW1200_CUT_22_ID_STR2 &&