コード例 #1
0
/**
 * Write device file "macro_keys"
 *
 * Enables the macro keys whenever the file is written to
 */
static ssize_t razer_attr_write_macro_keys(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
{
    struct usb_interface *intf = to_usb_interface(dev->parent);
    struct usb_device *usb_dev = interface_to_usbdev(intf);
    razer_activate_macro_keys(usb_dev);
    return count;
}
コード例 #2
0
static ssize_t razer_attr_write_macro_keys(struct device *dev, struct device_attribute *attr,
               const char *buf, size_t count)       
{                                   
    struct usb_interface *intf = to_usb_interface(dev->parent);     
    //struct razer_kbd_device *widow = usb_get_intfdata(intf);           
    struct usb_device *usb_dev = interface_to_usbdev(intf);
    //int temp = simple_strtoul(buf, NULL, 10);           
    razer_activate_macro_keys(usb_dev);
    return count;                           
}