Skip to content

Commit

Permalink
Merge tag 'char-misc-4.9-rc1' of git://git.kernel.org/pub/scm/linux/k…
Browse files Browse the repository at this point in the history
…ernel/git/gregkh/char-misc

Pull char/misc driver updates from Greg KH:
 "Here's the "big" char and misc driver update for 4.9-rc1.

  Lots of little things here, all over the driver tree for subsystems
  that flow through me. Nothing major that I can discern, full details
  are in the shortlog.

  All have been in the linux-next tree with no reported issues"

* tag 'char-misc-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (144 commits)
  drivers/misc/hpilo: Changes to support new security states in iLO5 FW
  at25: fix debug and error messaging
  misc/genwqe: ensure zero initialization
  vme: fake: remove unexpected unlock in fake_master_set()
  vme: fake: mark symbols static where possible
  spmi: pmic-arb: Return an error code if sanity check fails
  Drivers: hv: get rid of id in struct vmbus_channel
  Drivers: hv: make VMBus bus ids persistent
  mcb: Add a dma_device to mcb_device
  mcb: Enable PCI bus mastering by default
  mei: stop the stall timer worker if not needed
  clk: probe common clock drivers earlier
  vme: fake: fix build for 64-bit dma_addr_t
  ttyprintk: Neaten and simplify printing
  mei: me: add kaby point device ids
  coresight: tmc: mark symbols static where possible
  coresight: perf: deal with error condition properly
  Drivers: hv: hv_util: Avoid dynamic allocation in time synch
  fpga manager: Add hardware dependency to Zynq driver
  Drivers: hv: utils: Support TimeSync version 4.0 protocol samples.
  ...
  • Loading branch information
torvalds committed Oct 4, 2016
2 parents 597f03f + c9fef1c commit 7a53eea
Show file tree
Hide file tree
Showing 129 changed files with 4,040 additions and 2,805 deletions.
5 changes: 5 additions & 0 deletions CREDITS
Original file line number Diff line number Diff line change
Expand Up @@ -1944,6 +1944,11 @@ E: [email protected]
E: [email protected]
D: video4linux, bttv, vesafb, some scsi, misc fixes

N: Hans J. Koch
D: USERSPACE I/O, MAX6650
D: Hans passed away in June 2016, and will be greatly missed.
W: https://lwn.net/Articles/691000/

N: Harald Koenig
E: [email protected]
D: XFree86 (S3), DCF77, some kernel hacks and fixes
Expand Down
2 changes: 1 addition & 1 deletion Documentation/ABI/testing/sysfs-class-mic.txt
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ Description:

What: /sys/class/mic/mic(x)/heartbeat_enable
Date: March 2015
KernelVersion: 3.20
KernelVersion: 4.4
Contact: Ashutosh Dixit <[email protected]>
Description:
The MIC drivers detect and inform user space about card crashes
Expand Down
31 changes: 0 additions & 31 deletions Documentation/ABI/testing/sysfs-i2c-bmp085

This file was deleted.

13 changes: 11 additions & 2 deletions Documentation/devicetree/bindings/nvmem/rockchip-efuse.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,28 @@
= Rockchip eFuse device tree bindings =

Required properties:
- compatible: Should be "rockchip,rockchip-efuse"
- compatible: Should be one of the following.
- "rockchip,rk3066a-efuse" - for RK3066a SoCs.
- "rockchip,rk3188-efuse" - for RK3188 SoCs.
- "rockchip,rk3288-efuse" - for RK3288 SoCs.
- "rockchip,rk3399-efuse" - for RK3399 SoCs.
- reg: Should contain the registers location and exact eFuse size
- clocks: Should be the clock id of eFuse
- clock-names: Should be "pclk_efuse"

Deprecated properties:
- compatible: "rockchip,rockchip-efuse"
Old efuse compatible value compatible to rk3066a, rk3188 and rk3288
efuses

= Data cells =
Are child nodes of eFuse, bindings of which as described in
bindings/nvmem/nvmem.txt

Example:

efuse: efuse@ffb40000 {
compatible = "rockchip,rockchip-efuse";
compatible = "rockchip,rk3288-efuse";
reg = <0xffb40000 0x20>;
#address-cells = <1>;
#size-cells = <1>;
Expand Down
13 changes: 7 additions & 6 deletions Documentation/vme_api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ As with other subsystems within the Linux kernel, VME device drivers register
with the VME subsystem, typically called from the devices init routine. This is
achieved via a call to the following function:

int vme_register_driver (struct vme_driver *driver);
int vme_register_driver (struct vme_driver *driver, unsigned int ndevs);

If driver registration is successful this function returns zero, if an error
occurred a negative error code will be returned.

A pointer to a structure of type 'vme_driver' must be provided to the
registration function. The structure is as follows:
registration function. Along with ndevs, which is the number of devices your
driver is able to support. The structure is as follows:

struct vme_driver {
struct list_head node;
Expand All @@ -32,8 +33,8 @@ At the minimum, the '.name', '.match' and '.probe' elements of this structure
should be correctly set. The '.name' element is a pointer to a string holding
the device driver's name.

The '.match' function allows controlling the number of devices that need to
be registered. The match function should return 1 if a device should be
The '.match' function allows control over which VME devices should be registered
with the driver. The match function should return 1 if a device should be
probed and 0 otherwise. This example match function (from vme_user.c) limits
the number of devices probed to one:

Expand Down Expand Up @@ -385,13 +386,13 @@ location monitor location. Each location monitor can monitor a number of
adjacent locations:

int vme_lm_attach(struct vme_resource *res, int num,
void (*callback)(int));
void (*callback)(void *));

int vme_lm_detach(struct vme_resource *res, int num);

The callback function is declared as follows.

void callback(int num);
void callback(void *data);


Slot Detection
Expand Down
4 changes: 1 addition & 3 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -7458,9 +7458,8 @@ F: Documentation/hwmon/max20751
F: drivers/hwmon/max20751.c

MAX6650 HARDWARE MONITOR AND FAN CONTROLLER DRIVER
M: "Hans J. Koch" <[email protected]>
L: [email protected]
S: Maintained
S: Orphan
F: Documentation/hwmon/max6650
F: drivers/hwmon/max6650.c

Expand Down Expand Up @@ -12418,7 +12417,6 @@ F: fs/hostfs/
F: fs/hppfs/

USERSPACE I/O (UIO)
M: "Hans J. Koch" <[email protected]>
M: Greg Kroah-Hartman <[email protected]>
S: Maintained
T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
Expand Down
14 changes: 1 addition & 13 deletions arch/arm/common/bL_switcher_dummy_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,4 @@ static struct miscdevice bL_switcher_device = {
"b.L_switcher",
&bL_switcher_fops
};

static int __init bL_switcher_dummy_if_init(void)
{
return misc_register(&bL_switcher_device);
}

static void __exit bL_switcher_dummy_if_exit(void)
{
misc_deregister(&bL_switcher_device);
}

module_init(bL_switcher_dummy_if_init);
module_exit(bL_switcher_dummy_if_exit);
module_misc_device(bL_switcher_device);
13 changes: 1 addition & 12 deletions arch/blackfin/mach-bf561/coreb.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,7 @@ static struct miscdevice coreb_dev = {
.name = "coreb",
.fops = &coreb_fops,
};

static int __init bf561_coreb_init(void)
{
return misc_register(&coreb_dev);
}
module_init(bf561_coreb_init);

static void __exit bf561_coreb_exit(void)
{
misc_deregister(&coreb_dev);
}
module_exit(bf561_coreb_exit);
module_misc_device(coreb_dev);

MODULE_AUTHOR("Bas Vermeulen <[email protected]>");
MODULE_DESCRIPTION("BF561 Core B Support");
Expand Down
25 changes: 1 addition & 24 deletions arch/um/drivers/harddog_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,27 +175,4 @@ static struct miscdevice harddog_miscdev = {
.name = "watchdog",
.fops = &harddog_fops,
};

static char banner[] __initdata = KERN_INFO "UML Watchdog Timer\n";

static int __init harddog_init(void)
{
int ret;

ret = misc_register(&harddog_miscdev);

if (ret)
return ret;

printk(banner);

return 0;
}

static void __exit harddog_exit(void)
{
misc_deregister(&harddog_miscdev);
}

module_init(harddog_init);
module_exit(harddog_exit);
module_misc_device(harddog_miscdev);
4 changes: 2 additions & 2 deletions drivers/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ obj-$(CONFIG_SFI) += sfi/
# was used and do nothing if so
obj-$(CONFIG_PNP) += pnp/
obj-y += amba/

obj-y += clk/
# Many drivers will want to use DMA so this has to be made available
# really early.
obj-$(CONFIG_DMADEVICES) += dma/
Expand Down Expand Up @@ -142,8 +144,6 @@ obj-$(CONFIG_VHOST) += vhost/
obj-$(CONFIG_VLYNQ) += vlynq/
obj-$(CONFIG_STAGING) += staging/
obj-y += platform/
#common clk code
obj-y += clk/

obj-$(CONFIG_MAILBOX) += mailbox/
obj-$(CONFIG_HWSPINLOCK) += hwspinlock/
Expand Down
16 changes: 1 addition & 15 deletions drivers/bluetooth/hci_vhci.c
Original file line number Diff line number Diff line change
Expand Up @@ -377,21 +377,7 @@ static struct miscdevice vhci_miscdev = {
.fops = &vhci_fops,
.minor = VHCI_MINOR,
};

static int __init vhci_init(void)
{
BT_INFO("Virtual HCI driver ver %s", VERSION);

return misc_register(&vhci_miscdev);
}

static void __exit vhci_exit(void)
{
misc_deregister(&vhci_miscdev);
}

module_init(vhci_init);
module_exit(vhci_exit);
module_misc_device(vhci_miscdev);

module_param(amp, bool, 0644);
MODULE_PARM_DESC(amp, "Create AMP controller device");
Expand Down
40 changes: 1 addition & 39 deletions drivers/char/bfin-otp.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,45 +230,7 @@ static struct miscdevice bfin_otp_misc_device = {
.name = DRIVER_NAME,
.fops = &bfin_otp_fops,
};

/**
* bfin_otp_init - Initialize module
*
* Registers the device and notifier handler. Actual device
* initialization is handled by bfin_otp_open().
*/
static int __init bfin_otp_init(void)
{
int ret;

stampit();

ret = misc_register(&bfin_otp_misc_device);
if (ret) {
pr_init(KERN_ERR PFX "unable to register a misc device\n");
return ret;
}

pr_init(KERN_INFO PFX "initialized\n");

return 0;
}

/**
* bfin_otp_exit - Deinitialize module
*
* Unregisters the device and notifier handler. Actual device
* deinitialization is handled by bfin_otp_close().
*/
static void __exit bfin_otp_exit(void)
{
stampit();

misc_deregister(&bfin_otp_misc_device);
}

module_init(bfin_otp_init);
module_exit(bfin_otp_exit);
module_misc_device(bfin_otp_misc_device);

MODULE_AUTHOR("Mike Frysinger <[email protected]>");
MODULE_DESCRIPTION("Blackfin OTP Memory Interface");
Expand Down
6 changes: 6 additions & 0 deletions drivers/char/mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,9 @@ static ssize_t read_kmem(struct file *file, char __user *buf,
char *kbuf; /* k-addr because vread() takes vmlist_lock rwlock */
int err = 0;

if (!pfn_valid(PFN_DOWN(p)))
return -EIO;

read = 0;
if (p < (unsigned long) high_memory) {
low_count = count;
Expand Down Expand Up @@ -509,6 +512,9 @@ static ssize_t write_kmem(struct file *file, const char __user *buf,
char *kbuf; /* k-addr because vwrite() takes vmlist_lock rwlock */
int err = 0;

if (!pfn_valid(PFN_DOWN(p)))
return -EIO;

if (p < (unsigned long) high_memory) {
unsigned long to_write = min_t(unsigned long, count,
(unsigned long)high_memory - p);
Expand Down
Loading

0 comments on commit 7a53eea

Please sign in to comment.