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

Commit a4dc3237 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
  wm97xx_batery: replace driver_data with dev_get_drvdata()
  omap: video: remove direct access of driver_data
  Sound: remove direct access of driver_data
  driver model: fix show/store prototypes in doc.
  Firmware: firmware_class, fix lock imbalance
  Driver Core: remove BUS_ID_SIZE
  sparc: remove driver-core BUS_ID_SIZE
  partitions: fix broken uevent_suppress conversion
  devres: WARN() and return, don't crash on device_del() of uninitialized device
parents 51feb98d 38c7dc37
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -207,8 +207,8 @@ Attributes
~~~~~~~~~~
struct driver_attribute {
        struct attribute        attr;
        ssize_t (*show)(struct device_driver *, char * buf, size_t count, loff_t off);
        ssize_t (*store)(struct device_driver *, const char * buf, size_t count, loff_t off);
        ssize_t (*show)(struct device_driver *driver, char *buf);
        ssize_t (*store)(struct device_driver *, const char * buf, size_t count);
};

Device drivers can export attributes via their sysfs directories. 
+6 −1
Original line number Diff line number Diff line
@@ -224,7 +224,12 @@ static struct vio_dev *vio_create_one(struct mdesc_handle *hp, u64 mp,
	if (!strcmp(type, "domain-services-port"))
		bus_id_name = "ds";

	if (strlen(bus_id_name) >= BUS_ID_SIZE - 4) {
	/*
	 * 20 char is the old driver-core name size limit, which is no more.
	 * This check can probably be removed after review and possible
	 * adaption of the vio users name length handling.
	 */
	if (strlen(bus_id_name) >= 20 - 4) {
		printk(KERN_ERR "VIO: bus_id_name [%s] is too long.\n",
		       bus_id_name);
		return NULL;
+3 −0
Original line number Diff line number Diff line
@@ -428,6 +428,9 @@ int devres_release_all(struct device *dev)
{
	unsigned long flags;

	/* Looks like an uninitialized device structure */
	if (WARN_ON(dev->devres_head.next == NULL))
		return -ENODEV;
	spin_lock_irqsave(&dev->devres_lock, flags);
	return release_nodes(dev, dev->devres_head.next, &dev->devres_head,
			     flags);
+4 −2
Original line number Diff line number Diff line
@@ -217,8 +217,10 @@ firmware_data_read(struct kobject *kobj, struct bin_attribute *bin_attr,
		ret_count = -ENODEV;
		goto out;
	}
	if (offset > fw->size)
		return 0;
	if (offset > fw->size) {
		ret_count = 0;
		goto out;
	}
	if (count > fw->size - offset)
		count = fw->size - offset;

+2 −2
Original line number Diff line number Diff line
@@ -33,14 +33,14 @@ static enum power_supply_property *prop;

static unsigned long wm97xx_read_bat(struct power_supply *bat_ps)
{
	return wm97xx_read_aux_adc(bat_ps->dev->parent->driver_data,
	return wm97xx_read_aux_adc(dev_get_drvdata(bat_ps->dev->parent),
					pdata->batt_aux) * pdata->batt_mult /
					pdata->batt_div;
}

static unsigned long wm97xx_read_temp(struct power_supply *bat_ps)
{
	return wm97xx_read_aux_adc(bat_ps->dev->parent->driver_data,
	return wm97xx_read_aux_adc(dev_get_drvdata(bat_ps->dev->parent),
					pdata->temp_aux) * pdata->temp_mult /
					pdata->temp_div;
}
Loading