configfs.c (61065fc3e32002ba48aa6bc3816c1f6f9f8daf55) | configfs.c (4ad0141226f00eee3cfe4392c27e14bf15520640) |
---|---|
1#include <linux/configfs.h> 2#include <linux/module.h> 3#include <linux/slab.h> 4#include <linux/device.h> 5#include <linux/nls.h> 6#include <linux/usb/composite.h> 7#include <linux/usb/gadget_configfs.h> 8#include "configfs.h" --- 491 unchanged lines hidden (view full) --- 500CONFIGFS_ATTR(gadget_config_desc_, bmAttributes); 501 502static struct configfs_attribute *gadget_config_attrs[] = { 503 &gadget_config_desc_attr_MaxPower, 504 &gadget_config_desc_attr_bmAttributes, 505 NULL, 506}; 507 | 1#include <linux/configfs.h> 2#include <linux/module.h> 3#include <linux/slab.h> 4#include <linux/device.h> 5#include <linux/nls.h> 6#include <linux/usb/composite.h> 7#include <linux/usb/gadget_configfs.h> 8#include "configfs.h" --- 491 unchanged lines hidden (view full) --- 500CONFIGFS_ATTR(gadget_config_desc_, bmAttributes); 501 502static struct configfs_attribute *gadget_config_attrs[] = { 503 &gadget_config_desc_attr_MaxPower, 504 &gadget_config_desc_attr_bmAttributes, 505 NULL, 506}; 507 |
508static struct config_item_type gadget_config_type = { | 508static const struct config_item_type gadget_config_type = { |
509 .ct_item_ops = &gadget_config_item_ops, 510 .ct_attrs = gadget_config_attrs, 511 .ct_owner = THIS_MODULE, 512}; 513 | 509 .ct_item_ops = &gadget_config_item_ops, 510 .ct_attrs = gadget_config_attrs, 511 .ct_owner = THIS_MODULE, 512}; 513 |
514static struct config_item_type gadget_root_type = { | 514static const struct config_item_type gadget_root_type = { |
515 .ct_item_ops = &gadget_root_item_ops, 516 .ct_attrs = gadget_root_attrs, 517 .ct_owner = THIS_MODULE, 518}; 519 520static void composite_init_dev(struct usb_composite_dev *cdev) 521{ 522 spin_lock_init(&cdev->lock); --- 65 unchanged lines hidden (view full) --- 588 config_item_put(item); 589} 590 591static struct configfs_group_operations functions_ops = { 592 .make_group = &function_make, 593 .drop_item = &function_drop, 594}; 595 | 515 .ct_item_ops = &gadget_root_item_ops, 516 .ct_attrs = gadget_root_attrs, 517 .ct_owner = THIS_MODULE, 518}; 519 520static void composite_init_dev(struct usb_composite_dev *cdev) 521{ 522 spin_lock_init(&cdev->lock); --- 65 unchanged lines hidden (view full) --- 588 config_item_put(item); 589} 590 591static struct configfs_group_operations functions_ops = { 592 .make_group = &function_make, 593 .drop_item = &function_drop, 594}; 595 |
596static struct config_item_type functions_type = { | 596static const struct config_item_type functions_type = { |
597 .ct_group_ops = &functions_ops, 598 .ct_owner = THIS_MODULE, 599}; 600 601GS_STRINGS_RW(gadget_config_name, configuration); 602 603static struct configfs_attribute *gadget_config_name_langid_attrs[] = { 604 &gadget_config_name_attr_configuration, --- 84 unchanged lines hidden (view full) --- 689 config_item_put(item); 690} 691 692static struct configfs_group_operations config_desc_ops = { 693 .make_group = &config_desc_make, 694 .drop_item = &config_desc_drop, 695}; 696 | 597 .ct_group_ops = &functions_ops, 598 .ct_owner = THIS_MODULE, 599}; 600 601GS_STRINGS_RW(gadget_config_name, configuration); 602 603static struct configfs_attribute *gadget_config_name_langid_attrs[] = { 604 &gadget_config_name_attr_configuration, --- 84 unchanged lines hidden (view full) --- 689 config_item_put(item); 690} 691 692static struct configfs_group_operations config_desc_ops = { 693 .make_group = &config_desc_make, 694 .drop_item = &config_desc_drop, 695}; 696 |
697static struct config_item_type config_desc_type = { | 697static const struct config_item_type config_desc_type = { |
698 .ct_group_ops = &config_desc_ops, 699 .ct_owner = THIS_MODULE, 700}; 701 702GS_STRINGS_RW(gadget_strings, manufacturer); 703GS_STRINGS_RW(gadget_strings, product); 704GS_STRINGS_RW(gadget_strings, serialnumber); 705 --- 765 unchanged lines hidden (view full) --- 1471 config_item_put(item); 1472} 1473 1474static struct configfs_group_operations gadgets_ops = { 1475 .make_group = &gadgets_make, 1476 .drop_item = &gadgets_drop, 1477}; 1478 | 698 .ct_group_ops = &config_desc_ops, 699 .ct_owner = THIS_MODULE, 700}; 701 702GS_STRINGS_RW(gadget_strings, manufacturer); 703GS_STRINGS_RW(gadget_strings, product); 704GS_STRINGS_RW(gadget_strings, serialnumber); 705 --- 765 unchanged lines hidden (view full) --- 1471 config_item_put(item); 1472} 1473 1474static struct configfs_group_operations gadgets_ops = { 1475 .make_group = &gadgets_make, 1476 .drop_item = &gadgets_drop, 1477}; 1478 |
1479static struct config_item_type gadgets_type = { | 1479static const struct config_item_type gadgets_type = { |
1480 .ct_group_ops = &gadgets_ops, 1481 .ct_owner = THIS_MODULE, 1482}; 1483 1484static struct configfs_subsystem gadget_subsys = { 1485 .su_group = { 1486 .cg_item = { 1487 .ci_namebuf = "usb_gadget", --- 32 unchanged lines hidden --- | 1480 .ct_group_ops = &gadgets_ops, 1481 .ct_owner = THIS_MODULE, 1482}; 1483 1484static struct configfs_subsystem gadget_subsys = { 1485 .su_group = { 1486 .cg_item = { 1487 .ci_namebuf = "usb_gadget", --- 32 unchanged lines hidden --- |