mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
char/misc patches for 4.12-rc1
Here is the big set of new char/misc driver drivers and features for 4.12-rc1. There's lots of new drivers added this time around, new firmware drivers from Google, more auxdisplay drivers, extcon drivers, fpga drivers, and a bunch of other driver updates. Nothing major, except if you happen to have the hardware for these drivers, and then you will be happy :) All of these have been in linux-next for a while with no reported issues. Signed-off-by: Greg Kroah-Hartman <[email protected]> -----BEGIN PGP SIGNATURE----- iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCWQvAgg8cZ3JlZ0Brcm9h aC5jb20ACgkQMUfUDdst+yknsACgzkAeyz16Z97J3UTaeejbR7nKUCAAoKY4WEHY 8O9f9pr9gj8GMBwxeZQa =OIfB -----END PGP SIGNATURE----- Merge tag 'char-misc-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver updates from Greg KH: "Here is the big set of new char/misc driver drivers and features for 4.12-rc1. There's lots of new drivers added this time around, new firmware drivers from Google, more auxdisplay drivers, extcon drivers, fpga drivers, and a bunch of other driver updates. Nothing major, except if you happen to have the hardware for these drivers, and then you will be happy :) All of these have been in linux-next for a while with no reported issues" * tag 'char-misc-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (136 commits) firmware: google memconsole: Fix return value check in platform_memconsole_init() firmware: Google VPD: Fix return value check in vpd_platform_init() goldfish_pipe: fix build warning about using too much stack. goldfish_pipe: An implementation of more parallel pipe fpga fr br: update supported version numbers fpga: region: release FPGA region reference in error path fpga altera-hps2fpga: disable/unprepare clock on error in alt_fpga_bridge_probe() mei: drop the TODO from samples firmware: Google VPD sysfs driver firmware: Google VPD: import lib_vpd source files misc: lkdtm: Add volatile to intentional NULL pointer reference eeprom: idt_89hpesx: Add OF device ID table misc: ds1682: Add OF device ID table misc: tsl2550: Add OF device ID table w1: Remove unneeded use of assert() and remove w1_log.h w1: Use kernel common min() implementation uio_mf624: Align memory regions to page size and set correct offsets uio_mf624: Refactor memory info initialization uio: Allow handling of non page-aligned memory regions hangcheck-timer: Fix typo in comment ...
This commit is contained in:
commit
af82455f7d
166 changed files with 8064 additions and 3259 deletions
|
|
@ -1205,12 +1205,15 @@ static void ib_ucm_release_dev(struct device *dev)
|
|||
struct ib_ucm_device *ucm_dev;
|
||||
|
||||
ucm_dev = container_of(dev, struct ib_ucm_device, dev);
|
||||
cdev_del(&ucm_dev->cdev);
|
||||
kfree(ucm_dev);
|
||||
}
|
||||
|
||||
static void ib_ucm_free_dev(struct ib_ucm_device *ucm_dev)
|
||||
{
|
||||
if (ucm_dev->devnum < IB_UCM_MAX_DEVICES)
|
||||
clear_bit(ucm_dev->devnum, dev_map);
|
||||
else
|
||||
clear_bit(ucm_dev->devnum - IB_UCM_MAX_DEVICES, overflow_map);
|
||||
kfree(ucm_dev);
|
||||
}
|
||||
|
||||
static const struct file_operations ucm_fops = {
|
||||
|
|
@ -1266,7 +1269,9 @@ static void ib_ucm_add_one(struct ib_device *device)
|
|||
if (!ucm_dev)
|
||||
return;
|
||||
|
||||
device_initialize(&ucm_dev->dev);
|
||||
ucm_dev->ib_dev = device;
|
||||
ucm_dev->dev.release = ib_ucm_release_dev;
|
||||
|
||||
devnum = find_first_zero_bit(dev_map, IB_UCM_MAX_DEVICES);
|
||||
if (devnum >= IB_UCM_MAX_DEVICES) {
|
||||
|
|
@ -1286,16 +1291,14 @@ static void ib_ucm_add_one(struct ib_device *device)
|
|||
cdev_init(&ucm_dev->cdev, &ucm_fops);
|
||||
ucm_dev->cdev.owner = THIS_MODULE;
|
||||
kobject_set_name(&ucm_dev->cdev.kobj, "ucm%d", ucm_dev->devnum);
|
||||
if (cdev_add(&ucm_dev->cdev, base, 1))
|
||||
goto err;
|
||||
|
||||
ucm_dev->dev.class = &cm_class;
|
||||
ucm_dev->dev.parent = device->dev.parent;
|
||||
ucm_dev->dev.devt = ucm_dev->cdev.dev;
|
||||
ucm_dev->dev.release = ib_ucm_release_dev;
|
||||
ucm_dev->dev.devt = base;
|
||||
|
||||
dev_set_name(&ucm_dev->dev, "ucm%d", ucm_dev->devnum);
|
||||
if (device_register(&ucm_dev->dev))
|
||||
goto err_cdev;
|
||||
if (cdev_device_add(&ucm_dev->cdev, &ucm_dev->dev))
|
||||
goto err_devnum;
|
||||
|
||||
if (device_create_file(&ucm_dev->dev, &dev_attr_ibdev))
|
||||
goto err_dev;
|
||||
|
|
@ -1304,15 +1307,11 @@ static void ib_ucm_add_one(struct ib_device *device)
|
|||
return;
|
||||
|
||||
err_dev:
|
||||
device_unregister(&ucm_dev->dev);
|
||||
err_cdev:
|
||||
cdev_del(&ucm_dev->cdev);
|
||||
if (ucm_dev->devnum < IB_UCM_MAX_DEVICES)
|
||||
clear_bit(devnum, dev_map);
|
||||
else
|
||||
clear_bit(devnum, overflow_map);
|
||||
cdev_device_del(&ucm_dev->cdev, &ucm_dev->dev);
|
||||
err_devnum:
|
||||
ib_ucm_free_dev(ucm_dev);
|
||||
err:
|
||||
kfree(ucm_dev);
|
||||
put_device(&ucm_dev->dev);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1323,7 +1322,9 @@ static void ib_ucm_remove_one(struct ib_device *device, void *client_data)
|
|||
if (!ucm_dev)
|
||||
return;
|
||||
|
||||
device_unregister(&ucm_dev->dev);
|
||||
cdev_device_del(&ucm_dev->cdev, &ucm_dev->dev);
|
||||
ib_ucm_free_dev(ucm_dev);
|
||||
put_device(&ucm_dev->dev);
|
||||
}
|
||||
|
||||
static CLASS_ATTR_STRING(abi_version, S_IRUGO,
|
||||
|
|
|
|||
|
|
@ -1187,7 +1187,7 @@ static int ib_umad_init_port(struct ib_device *device, int port_num,
|
|||
|
||||
cdev_init(&port->cdev, &umad_fops);
|
||||
port->cdev.owner = THIS_MODULE;
|
||||
port->cdev.kobj.parent = &umad_dev->kobj;
|
||||
cdev_set_parent(&port->cdev, &umad_dev->kobj);
|
||||
kobject_set_name(&port->cdev.kobj, "umad%d", port->dev_num);
|
||||
if (cdev_add(&port->cdev, base, 1))
|
||||
goto err_cdev;
|
||||
|
|
@ -1206,7 +1206,7 @@ static int ib_umad_init_port(struct ib_device *device, int port_num,
|
|||
base += IB_UMAD_MAX_PORTS;
|
||||
cdev_init(&port->sm_cdev, &umad_sm_fops);
|
||||
port->sm_cdev.owner = THIS_MODULE;
|
||||
port->sm_cdev.kobj.parent = &umad_dev->kobj;
|
||||
cdev_set_parent(&port->sm_cdev, &umad_dev->kobj);
|
||||
kobject_set_name(&port->sm_cdev.kobj, "issm%d", port->dev_num);
|
||||
if (cdev_add(&port->sm_cdev, base, 1))
|
||||
goto err_sm_cdev;
|
||||
|
|
|
|||
|
|
@ -1093,7 +1093,7 @@ static void ib_uverbs_add_one(struct ib_device *device)
|
|||
cdev_init(&uverbs_dev->cdev, NULL);
|
||||
uverbs_dev->cdev.owner = THIS_MODULE;
|
||||
uverbs_dev->cdev.ops = device->mmap ? &uverbs_mmap_fops : &uverbs_fops;
|
||||
uverbs_dev->cdev.kobj.parent = &uverbs_dev->kobj;
|
||||
cdev_set_parent(&uverbs_dev->cdev, &uverbs_dev->kobj);
|
||||
kobject_set_name(&uverbs_dev->cdev.kobj, "uverbs%d", uverbs_dev->devnum);
|
||||
if (cdev_add(&uverbs_dev->cdev, base, 1))
|
||||
goto err_cdev;
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ int hfi1_cdev_init(int minor, const char *name,
|
|||
|
||||
cdev_init(cdev, fops);
|
||||
cdev->owner = THIS_MODULE;
|
||||
cdev->kobj.parent = parent;
|
||||
cdev_set_parent(cdev, parent);
|
||||
kobject_set_name(&cdev->kobj, name);
|
||||
|
||||
ret = cdev_add(cdev, dev, 1);
|
||||
|
|
|
|||
Loading…
Reference in a new issue