Commit 1af115d6 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull driver core updates from Greg KH:
 "Here is the new patches for the driver core / sysfs for 4.3-rc1.

  Very small number of changes here, all the details are in the
  shortlog, nothing major happening at all this kernel release, which is
  nice to see"

* tag 'driver-core-4.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
  bus: subsys: update return type of ->remove_dev() to void
  driver core: correct device's shutdown order
  driver core: fix docbook for device_private.device
  selftests: firmware: skip timeout checks for kernels without user mode helper
  kernel, cpu: Remove bogus __ref annotations
  cpu: Remove bogus __ref annotation of cpu_subsys_online()
  firmware: fix wrong memory deallocation in fw_add_devm_name()
  sysfs.txt: update show method notes about sprintf/snprintf/scnprintf usage
  devres: fix devres_get()
parents 1c00038c 71db87ba
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -212,7 +212,10 @@ Other notes:
- show() methods should return the number of bytes printed into the
  buffer. This is the return value of scnprintf().

- show() should always use scnprintf().
- show() must not use snprintf() when formatting the value to be
  returned to user space. If you can guarantee that an overflow
  will never happen you can use sprintf() otherwise you must use
  scnprintf().

- store() should return the number of bytes used from the buffer. If the
  entire buffer has been used, just return the count argument.
+1 −2
Original line number Diff line number Diff line
@@ -355,13 +355,12 @@ static int sq_dev_add(struct device *dev, struct subsys_interface *sif)
	return error;
}

static int sq_dev_remove(struct device *dev, struct subsys_interface *sif)
static void sq_dev_remove(struct device *dev, struct subsys_interface *sif)
{
	unsigned int cpu = dev->id;
	struct kobject *kobj = sq_kobject[cpu];

	kobject_put(kobj);
	return 0;
}

static struct subsys_interface sq_interface = {
+4 −7
Original line number Diff line number Diff line
@@ -198,16 +198,13 @@ static int hv_stats_device_add(struct device *dev, struct subsys_interface *sif)
	return err;
}

static int hv_stats_device_remove(struct device *dev,
static void hv_stats_device_remove(struct device *dev,
				   struct subsys_interface *sif)
{
	int cpu = dev->id;

	if (!cpu_online(cpu))
		return 0;

	if (cpu_online(cpu))
		sysfs_remove_file(&dev->kobj, &dev_attr_hv_stats.attr);
	return 0;
}


+2 −3
Original line number Diff line number Diff line
@@ -377,17 +377,16 @@ static int mc_device_add(struct device *dev, struct subsys_interface *sif)
	return err;
}

static int mc_device_remove(struct device *dev, struct subsys_interface *sif)
static void mc_device_remove(struct device *dev, struct subsys_interface *sif)
{
	int cpu = dev->id;

	if (!cpu_online(cpu))
		return 0;
		return;

	pr_debug("CPU%d removed\n", cpu);
	microcode_fini_cpu(cpu);
	sysfs_remove_group(&dev->kobj, &mc_attr_group);
	return 0;
}

static struct subsys_interface mc_cpu_interface = {
+2 −1
Original line number Diff line number Diff line
@@ -63,7 +63,7 @@ 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.
 * @device - pointer back to the struct class that this structure is
 * @device - pointer back to the struct device that this structure is
 * associated with.
 *
 * Nothing outside of the driver core should ever touch these fields.
@@ -134,6 +134,7 @@ extern int devres_release_all(struct device *dev);

/* /sys/devices directory */
extern struct kset *devices_kset;
extern void devices_kset_move_last(struct device *dev);

#if defined(CONFIG_MODULES) && defined(CONFIG_SYSFS)
extern void module_add_driver(struct module *mod, struct device_driver *drv);
Loading