mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
driver core patches for 4.13-rc1
Here is the big driver core update for 4.13-rc1. The large majority of this is a lot of cleanup of old fields in the driver core structures and their remaining usages in random drivers. All of those fixes have been reviewed by the various subsystem maintainers. There's also some small firmware updates in here, a new kobject uevent api interface that makes userspace interaction easier, and a few other minor things. All of these have been in linux-next for a long while with no reported issues. Signed-off-by: Greg Kroah-Hartman <[email protected]> -----BEGIN PGP SIGNATURE----- iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCWVpX4A8cZ3JlZ0Brcm9h aC5jb20ACgkQMUfUDdst+ymobgCfd0d13IfpZoq1N41wc6z2Z0xD7cwAnRMeH1/p kEeISGpHPYP9f8PBh9FO =Hfqt -----END PGP SIGNATURE----- Merge tag 'driver-core-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core updates from Greg KH: "Here is the big driver core update for 4.13-rc1. The large majority of this is a lot of cleanup of old fields in the driver core structures and their remaining usages in random drivers. All of those fixes have been reviewed by the various subsystem maintainers. There's also some small firmware updates in here, a new kobject uevent api interface that makes userspace interaction easier, and a few other minor things. All of these have been in linux-next for a long while with no reported issues" * tag 'driver-core-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (56 commits) arm: mach-rpc: ecard: fix build error zram: convert remaining CLASS_ATTR() to CLASS_ATTR_RO() driver-core: remove struct bus_type.dev_attrs powerpc: vio_cmo: use dev_groups and not dev_attrs for bus_type powerpc: vio: use dev_groups and not dev_attrs for bus_type USB: usbip: convert to use DRIVER_ATTR_RW s390: drivers: convert to use DRIVER_ATTR_RO/WO platform: thinkpad_acpi: convert to use DRIVER_ATTR_RO/RW pcmcia: ds: convert to use DRIVER_ATTR_RO wireless: ipw2x00: convert to use DRIVER_ATTR_RW net: ehea: convert to use DRIVER_ATTR_RO net: caif: convert to use DRIVER_ATTR_RO TTY: hvc: convert to use DRIVER_ATTR_RW PCI: pci-driver: convert to use DRIVER_ATTR_WO IB: nes: convert to use DRIVER_ATTR_RW HID: hid-core: convert to use DRIVER_ATTR_RO and drv_groups arm: ecard: fix dev_groups patch typo tty: serdev: use dev_groups and not dev_attrs for bus_type sparc: vio: use dev_groups and not dev_attrs for bus_type hid: intel-ish-hid: use dev_groups and not dev_attrs for bus_type ...
This commit is contained in:
commit
974668417b
64 changed files with 1116 additions and 1040 deletions
|
|
@ -349,9 +349,9 @@ static void class_pktcdvd_release(struct class *cls)
|
|||
{
|
||||
kfree(cls);
|
||||
}
|
||||
static ssize_t class_pktcdvd_show_map(struct class *c,
|
||||
struct class_attribute *attr,
|
||||
char *data)
|
||||
|
||||
static ssize_t device_map_show(struct class *c, struct class_attribute *attr,
|
||||
char *data)
|
||||
{
|
||||
int n = 0;
|
||||
int idx;
|
||||
|
|
@ -369,11 +369,10 @@ static ssize_t class_pktcdvd_show_map(struct class *c,
|
|||
mutex_unlock(&ctl_mutex);
|
||||
return n;
|
||||
}
|
||||
static CLASS_ATTR_RO(device_map);
|
||||
|
||||
static ssize_t class_pktcdvd_store_add(struct class *c,
|
||||
struct class_attribute *attr,
|
||||
const char *buf,
|
||||
size_t count)
|
||||
static ssize_t add_store(struct class *c, struct class_attribute *attr,
|
||||
const char *buf, size_t count)
|
||||
{
|
||||
unsigned int major, minor;
|
||||
|
||||
|
|
@ -391,11 +390,10 @@ static ssize_t class_pktcdvd_store_add(struct class *c,
|
|||
|
||||
return -EINVAL;
|
||||
}
|
||||
static CLASS_ATTR_WO(add);
|
||||
|
||||
static ssize_t class_pktcdvd_store_remove(struct class *c,
|
||||
struct class_attribute *attr,
|
||||
const char *buf,
|
||||
size_t count)
|
||||
static ssize_t remove_store(struct class *c, struct class_attribute *attr,
|
||||
const char *buf, size_t count)
|
||||
{
|
||||
unsigned int major, minor;
|
||||
if (sscanf(buf, "%u:%u", &major, &minor) == 2) {
|
||||
|
|
@ -404,14 +402,15 @@ static ssize_t class_pktcdvd_store_remove(struct class *c,
|
|||
}
|
||||
return -EINVAL;
|
||||
}
|
||||
static CLASS_ATTR_WO(remove);
|
||||
|
||||
static struct class_attribute class_pktcdvd_attrs[] = {
|
||||
__ATTR(add, 0200, NULL, class_pktcdvd_store_add),
|
||||
__ATTR(remove, 0200, NULL, class_pktcdvd_store_remove),
|
||||
__ATTR(device_map, 0444, class_pktcdvd_show_map, NULL),
|
||||
__ATTR_NULL
|
||||
static struct attribute *class_pktcdvd_attrs[] = {
|
||||
&class_attr_add.attr,
|
||||
&class_attr_remove.attr,
|
||||
&class_attr_device_map.attr,
|
||||
NULL,
|
||||
};
|
||||
|
||||
ATTRIBUTE_GROUPS(class_pktcdvd);
|
||||
|
||||
static int pkt_sysfs_init(void)
|
||||
{
|
||||
|
|
@ -427,7 +426,7 @@ static int pkt_sysfs_init(void)
|
|||
class_pktcdvd->name = DRIVER_NAME;
|
||||
class_pktcdvd->owner = THIS_MODULE;
|
||||
class_pktcdvd->class_release = class_pktcdvd_release;
|
||||
class_pktcdvd->class_attrs = class_pktcdvd_attrs;
|
||||
class_pktcdvd->class_groups = class_pktcdvd_groups;
|
||||
ret = class_register(class_pktcdvd);
|
||||
if (ret) {
|
||||
kfree(class_pktcdvd);
|
||||
|
|
|
|||
|
|
@ -1272,6 +1272,13 @@ static int zram_remove(struct zram *zram)
|
|||
}
|
||||
|
||||
/* zram-control sysfs attributes */
|
||||
|
||||
/*
|
||||
* NOTE: hot_add attribute is not the usual read-only sysfs attribute. In a
|
||||
* sense that reading from this file does alter the state of your system -- it
|
||||
* creates a new un-initialized zram device and returns back this device's
|
||||
* device_id (or an error code if it fails to create a new device).
|
||||
*/
|
||||
static ssize_t hot_add_show(struct class *class,
|
||||
struct class_attribute *attr,
|
||||
char *buf)
|
||||
|
|
@ -1286,6 +1293,7 @@ static ssize_t hot_add_show(struct class *class,
|
|||
return ret;
|
||||
return scnprintf(buf, PAGE_SIZE, "%d\n", ret);
|
||||
}
|
||||
static CLASS_ATTR_RO(hot_add);
|
||||
|
||||
static ssize_t hot_remove_store(struct class *class,
|
||||
struct class_attribute *attr,
|
||||
|
|
@ -1316,23 +1324,19 @@ static ssize_t hot_remove_store(struct class *class,
|
|||
mutex_unlock(&zram_index_mutex);
|
||||
return ret ? ret : count;
|
||||
}
|
||||
static CLASS_ATTR_WO(hot_remove);
|
||||
|
||||
/*
|
||||
* NOTE: hot_add attribute is not the usual read-only sysfs attribute. In a
|
||||
* sense that reading from this file does alter the state of your system -- it
|
||||
* creates a new un-initialized zram device and returns back this device's
|
||||
* device_id (or an error code if it fails to create a new device).
|
||||
*/
|
||||
static struct class_attribute zram_control_class_attrs[] = {
|
||||
__ATTR(hot_add, 0400, hot_add_show, NULL),
|
||||
__ATTR_WO(hot_remove),
|
||||
__ATTR_NULL,
|
||||
static struct attribute *zram_control_class_attrs[] = {
|
||||
&class_attr_hot_add.attr,
|
||||
&class_attr_hot_remove.attr,
|
||||
NULL,
|
||||
};
|
||||
ATTRIBUTE_GROUPS(zram_control_class);
|
||||
|
||||
static struct class zram_control_class = {
|
||||
.name = "zram-control",
|
||||
.owner = THIS_MODULE,
|
||||
.class_attrs = zram_control_class_attrs,
|
||||
.class_groups = zram_control_class_groups,
|
||||
};
|
||||
|
||||
static int zram_remove_cb(int id, void *ptr, void *data)
|
||||
|
|
|
|||
Loading…
Reference in a new issue