Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5da77761 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'driver-core-3.16-rc1' of...

Merge tag 'driver-core-3.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core into next

Pull driver core / kernfs changes from Greg KH:
 "Here is the "big" pull request for 3.16-rc1.

  Not a lot of changes here, some kernfs work, a revert of a very old
  driver core change that ended up cauing some memory leaks on driver
  probe error paths, and other minor things.

  As was pointed out earlier today, one commit here, 26fc9cd2
  ("kernfs: move the last knowledge of sysfs out from kernfs") is also
  needed in your 3.15-final branch as well.  If you could cherry-pick it
  there, it would be most appreciated by Andy Lutomirski to prevent a
  regression there.

  All of these have been in linux-next for a while"

* tag 'driver-core-3.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
  crypto/nx/nx-842: dev_set_drvdata can no longer fail
  kernfs: move the last knowledge of sysfs out from kernfs
  sysfs: fix attribute_group bin file path on removal
  sysfs.h: don't return a void-valued expression in sysfs_remove_file
  init.h: Update initcall_sync variants to fix build errors
  driver core: Inline dev_set/get_drvdata
  driver core: dev_get_drvdata: Don't check for NULL dev
  driver core: dev_set_drvdata returns void
  driver core: dev_set_drvdata can no longer fail
  driver core: Move driver_data back to struct device
  lib/devres.c: fix checkpatch warnings
  lib/devres.c: use dev in devm_request_and_ioremap
  kobject: Make support for uevent_helper optional.
  kernfs: make kernfs_notify() trigger inotify events too
  kernfs: implement kernfs_root->supers list
parents 4046136a cda43576
Loading
Loading
Loading
Loading
+11 −6
Original line number Diff line number Diff line
menu "Generic Driver Options"

config UEVENT_HELPER_PATH
	string "path to uevent helper"
	default ""
config UEVENT_HELPER
	bool "Support for uevent helper"
	default y
	help
	  Path to uevent helper program forked by the kernel for
	  The uevent helper program is forked by the kernel for
	  every uevent.
	  Before the switch to the netlink-based uevent source, this was
	  used to hook hotplug scripts into kernel device events. It
@@ -15,8 +15,13 @@ config UEVENT_HELPER_PATH
	  that it creates a high system load, or on smaller systems
	  it is known to create out-of-memory situations during bootup.

	  To disable user space helper program execution at early boot
	  time specify an empty string here. This setting can be altered
config UEVENT_HELPER_PATH
	string "path to uevent helper"
	depends on UEVENT_HELPER
	default ""
	help
	  To disable user space helper program execution at by default
	  specify an empty string here. This setting can still be altered
	  via /proc/sys/kernel/hotplug or via /sys/kernel/uevent_helper
	  later at runtime.

+0 −3
Original line number Diff line number Diff line
@@ -63,8 +63,6 @@ struct driver_private {
 *	binding of drivers which were unable to get all the resources needed by
 *	the device; typically because it depends on another driver getting
 *	probed first.
 * @driver_data - private pointer for driver specific info.  Will turn into a
 * list soon.
 * @device - pointer back to the struct class that this structure is
 * associated with.
 *
@@ -76,7 +74,6 @@ struct device_private {
	struct klist_node knode_driver;
	struct klist_node knode_bus;
	struct list_head deferred_probe;
	void *driver_data;
	struct device *device;
};
#define to_device_private_parent(obj)	\
+0 −26
Original line number Diff line number Diff line
@@ -587,29 +587,3 @@ void driver_detach(struct device_driver *drv)
		put_device(dev);
	}
}

/*
 * These exports can't be _GPL due to .h files using this within them, and it
 * might break something that was previously working...
 */
void *dev_get_drvdata(const struct device *dev)
{
	if (dev && dev->p)
		return dev->p->driver_data;
	return NULL;
}
EXPORT_SYMBOL(dev_get_drvdata);

int dev_set_drvdata(struct device *dev, void *data)
{
	int error;

	if (!dev->p) {
		error = device_private_init(dev);
		if (error)
			return error;
	}
	dev->p->driver_data = data;
	return 0;
}
EXPORT_SYMBOL(dev_set_drvdata);
+1 −6
Original line number Diff line number Diff line
@@ -1197,12 +1197,7 @@ static int __init nx842_probe(struct vio_dev *viodev,
	}

	rcu_read_lock();
	if (dev_set_drvdata(&viodev->dev, rcu_dereference(devdata))) {
		rcu_read_unlock();
		dev_err(&viodev->dev, "failed to set driver data for device\n");
		ret = -1;
		goto error;
	}
	dev_set_drvdata(&viodev->dev, rcu_dereference(devdata));
	rcu_read_unlock();

	if (sysfs_create_group(&viodev->dev.kobj, &nx842_attribute_group)) {
+1 −6
Original line number Diff line number Diff line
@@ -542,12 +542,7 @@ static int exynos_sysmmu_probe(struct platform_device *pdev)
		goto err_alloc;
	}

	ret = dev_set_drvdata(dev, data);
	if (ret) {
		dev_dbg(dev, "Unabled to initialize driver data\n");
		goto err_init;
	}

	dev_set_drvdata(dev, data);
	data->nsfrs = pdev->num_resources / 2;
	data->sfrbases = kmalloc(sizeof(*data->sfrbases) * data->nsfrs,
								GFP_KERNEL);
Loading