core.c (d9a145fb6e5f37b9903dea8371ab5c3e34e8e2d1) | core.c (eef35c2d41ddcc653c20d26b977acaa45c811e1f) |
---|---|
1/* 2 * drivers/base/core.c - core driver model code (device registration, etc) 3 * 4 * Copyright (c) 2002-3 Patrick Mochel 5 * Copyright (c) 2002-3 Open Source Development Labs 6 * Copyright (c) 2006 Greg Kroah-Hartman <gregkh@suse.de> 7 * Copyright (c) 2006 Novell, Inc. 8 * --- 237 unchanged lines hidden (view full) --- 246 if (dev->class && dev->class->dev_uevent) { 247 retval = dev->class->dev_uevent(dev, env); 248 if (retval) 249 pr_debug("device: '%s': %s: class uevent() " 250 "returned %d\n", dev_name(dev), 251 __func__, retval); 252 } 253 | 1/* 2 * drivers/base/core.c - core driver model code (device registration, etc) 3 * 4 * Copyright (c) 2002-3 Patrick Mochel 5 * Copyright (c) 2002-3 Open Source Development Labs 6 * Copyright (c) 2006 Greg Kroah-Hartman <gregkh@suse.de> 7 * Copyright (c) 2006 Novell, Inc. 8 * --- 237 unchanged lines hidden (view full) --- 246 if (dev->class && dev->class->dev_uevent) { 247 retval = dev->class->dev_uevent(dev, env); 248 if (retval) 249 pr_debug("device: '%s': %s: class uevent() " 250 "returned %d\n", dev_name(dev), 251 __func__, retval); 252 } 253 |
254 /* have the device type specific fuction add its stuff */ | 254 /* have the device type specific function add its stuff */ |
255 if (dev->type && dev->type->uevent) { 256 retval = dev->type->uevent(dev, env); 257 if (retval) 258 pr_debug("device: '%s': %s: dev_type uevent() " 259 "returned %d\n", dev_name(dev), 260 __func__, retval); 261 } 262 --- 1331 unchanged lines hidden (view full) --- 1594 * @dev: the pointer to the struct device to be renamed 1595 * @new_name: the new name of the device 1596 * 1597 * It is the responsibility of the caller to provide mutual 1598 * exclusion between two different calls of device_rename 1599 * on the same device to ensure that new_name is valid and 1600 * won't conflict with other devices. 1601 */ | 255 if (dev->type && dev->type->uevent) { 256 retval = dev->type->uevent(dev, env); 257 if (retval) 258 pr_debug("device: '%s': %s: dev_type uevent() " 259 "returned %d\n", dev_name(dev), 260 __func__, retval); 261 } 262 --- 1331 unchanged lines hidden (view full) --- 1594 * @dev: the pointer to the struct device to be renamed 1595 * @new_name: the new name of the device 1596 * 1597 * It is the responsibility of the caller to provide mutual 1598 * exclusion between two different calls of device_rename 1599 * on the same device to ensure that new_name is valid and 1600 * won't conflict with other devices. 1601 */ |
1602int device_rename(struct device *dev, const char *new_name) | 1602int device_rename(struct device *dev, char *new_name) |
1603{ 1604 char *old_class_name = NULL; 1605 char *new_class_name = NULL; 1606 char *old_device_name = NULL; 1607 int error; 1608 1609 dev = get_device(dev); 1610 if (!dev) --- 275 unchanged lines hidden --- | 1603{ 1604 char *old_class_name = NULL; 1605 char *new_class_name = NULL; 1606 char *old_device_name = NULL; 1607 int error; 1608 1609 dev = get_device(dev); 1610 if (!dev) --- 275 unchanged lines hidden --- |