Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6

* 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

+27 -19
+2 -2
Documentation/driver-model/driver.txt
··· 207 207 ~~~~~~~~~~ 208 208 struct driver_attribute { 209 209 struct attribute attr; 210 - ssize_t (*show)(struct device_driver *, char * buf, size_t count, loff_t off); 211 - ssize_t (*store)(struct device_driver *, const char * buf, size_t count, loff_t off); 210 + ssize_t (*show)(struct device_driver *driver, char *buf); 211 + ssize_t (*store)(struct device_driver *, const char * buf, size_t count); 212 212 }; 213 213 214 214 Device drivers can export attributes via their sysfs directories.
+6 -1
arch/sparc/kernel/vio.c
··· 224 224 if (!strcmp(type, "domain-services-port")) 225 225 bus_id_name = "ds"; 226 226 227 - if (strlen(bus_id_name) >= BUS_ID_SIZE - 4) { 227 + /* 228 + * 20 char is the old driver-core name size limit, which is no more. 229 + * This check can probably be removed after review and possible 230 + * adaption of the vio users name length handling. 231 + */ 232 + if (strlen(bus_id_name) >= 20 - 4) { 228 233 printk(KERN_ERR "VIO: bus_id_name [%s] is too long.\n", 229 234 bus_id_name); 230 235 return NULL;
+3
drivers/base/devres.c
··· 428 428 { 429 429 unsigned long flags; 430 430 431 + /* Looks like an uninitialized device structure */ 432 + if (WARN_ON(dev->devres_head.next == NULL)) 433 + return -ENODEV; 431 434 spin_lock_irqsave(&dev->devres_lock, flags); 432 435 return release_nodes(dev, dev->devres_head.next, &dev->devres_head, 433 436 flags);
+4 -2
drivers/base/firmware_class.c
··· 217 217 ret_count = -ENODEV; 218 218 goto out; 219 219 } 220 - if (offset > fw->size) 221 - return 0; 220 + if (offset > fw->size) { 221 + ret_count = 0; 222 + goto out; 223 + } 222 224 if (count > fw->size - offset) 223 225 count = fw->size - offset; 224 226
+2 -2
drivers/power/wm97xx_battery.c
··· 33 33 34 34 static unsigned long wm97xx_read_bat(struct power_supply *bat_ps) 35 35 { 36 - return wm97xx_read_aux_adc(bat_ps->dev->parent->driver_data, 36 + return wm97xx_read_aux_adc(dev_get_drvdata(bat_ps->dev->parent), 37 37 pdata->batt_aux) * pdata->batt_mult / 38 38 pdata->batt_div; 39 39 } 40 40 41 41 static unsigned long wm97xx_read_temp(struct power_supply *bat_ps) 42 42 { 43 - return wm97xx_read_aux_adc(bat_ps->dev->parent->driver_data, 43 + return wm97xx_read_aux_adc(dev_get_drvdata(bat_ps->dev->parent), 44 44 pdata->temp_aux) * pdata->temp_mult / 45 45 pdata->temp_div; 46 46 }
+7 -7
drivers/video/omap/omapfb_main.c
··· 1254 1254 static ssize_t omapfb_show_caps_num(struct device *dev, 1255 1255 struct device_attribute *attr, char *buf) 1256 1256 { 1257 - struct omapfb_device *fbdev = (struct omapfb_device *)dev->driver_data; 1257 + struct omapfb_device *fbdev = dev_get_drvdata(dev); 1258 1258 int plane; 1259 1259 size_t size; 1260 1260 struct omapfb_caps caps; ··· 1274 1274 static ssize_t omapfb_show_caps_text(struct device *dev, 1275 1275 struct device_attribute *attr, char *buf) 1276 1276 { 1277 - struct omapfb_device *fbdev = (struct omapfb_device *)dev->driver_data; 1277 + struct omapfb_device *fbdev = dev_get_drvdata(dev); 1278 1278 int i; 1279 1279 struct omapfb_caps caps; 1280 1280 int plane; ··· 1321 1321 static ssize_t omapfb_show_panel_name(struct device *dev, 1322 1322 struct device_attribute *attr, char *buf) 1323 1323 { 1324 - struct omapfb_device *fbdev = (struct omapfb_device *)dev->driver_data; 1324 + struct omapfb_device *fbdev = dev_get_drvdata(dev); 1325 1325 1326 1326 return snprintf(buf, PAGE_SIZE, "%s\n", fbdev->panel->name); 1327 1327 } ··· 1330 1330 struct device_attribute *attr, 1331 1331 char *buf) 1332 1332 { 1333 - struct omapfb_device *fbdev = (struct omapfb_device *)dev->driver_data; 1333 + struct omapfb_device *fbdev = dev_get_drvdata(dev); 1334 1334 int r; 1335 1335 1336 1336 if (fbdev->panel->get_bklight_level) { ··· 1345 1345 struct device_attribute *attr, 1346 1346 const char *buf, size_t size) 1347 1347 { 1348 - struct omapfb_device *fbdev = (struct omapfb_device *)dev->driver_data; 1348 + struct omapfb_device *fbdev = dev_get_drvdata(dev); 1349 1349 int r; 1350 1350 1351 1351 if (fbdev->panel->set_bklight_level) { ··· 1364 1364 static ssize_t omapfb_show_bklight_max(struct device *dev, 1365 1365 struct device_attribute *attr, char *buf) 1366 1366 { 1367 - struct omapfb_device *fbdev = (struct omapfb_device *)dev->driver_data; 1367 + struct omapfb_device *fbdev = dev_get_drvdata(dev); 1368 1368 int r; 1369 1369 1370 1370 if (fbdev->panel->get_bklight_level) { ··· 1397 1397 static ssize_t omapfb_show_ctrl_name(struct device *dev, 1398 1398 struct device_attribute *attr, char *buf) 1399 1399 { 1400 - struct omapfb_device *fbdev = (struct omapfb_device *)dev->driver_data; 1400 + struct omapfb_device *fbdev = dev_get_drvdata(dev); 1401 1401 1402 1402 return snprintf(buf, PAGE_SIZE, "%s\n", fbdev->ctrl->name); 1403 1403 }
+1 -1
fs/partitions/check.c
··· 436 436 rcu_assign_pointer(ptbl->part[partno], p); 437 437 438 438 /* suppress uevent if the disk supresses it */ 439 - if (!dev_get_uevent_suppress(pdev)) 439 + if (!dev_get_uevent_suppress(ddev)) 440 440 kobject_uevent(&pdev->kobj, KOBJ_ADD); 441 441 442 442 return p;
-2
include/linux/device.h
··· 25 25 #include <asm/atomic.h> 26 26 #include <asm/device.h> 27 27 28 - #define BUS_ID_SIZE 20 29 - 30 28 struct device; 31 29 struct device_private; 32 30 struct device_driver;
+2 -2
sound/soc/codecs/wm8988.c
··· 1037 1037 codec->control_data = spi; 1038 1038 codec->dev = &spi->dev; 1039 1039 1040 - spi->dev.driver_data = wm8988; 1040 + dev_set_drvdata(&spi->dev, wm8988); 1041 1041 1042 1042 return wm8988_register(wm8988); 1043 1043 } 1044 1044 1045 1045 static int __devexit wm8988_spi_remove(struct spi_device *spi) 1046 1046 { 1047 - struct wm8988_priv *wm8988 = spi->dev.driver_data; 1047 + struct wm8988_priv *wm8988 = dev_get_drvdata(&spi->dev); 1048 1048 1049 1049 wm8988_unregister(wm8988); 1050 1050