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

Commit a3634d71 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6:
  add SubmittingPatches to Documentation/ja_JP
  fix typo in SubmittingPatches
  Driver Core: fix bug in device_rename() for SYSFS_DEPRECATED=y
  sysfs: make sysfs_{get,put}_active() static
  kobject: check for duplicate names in kobject_rename
  Driver core: remove class_device_*_bin_file
parents 53173920 710701c8
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -464,8 +464,8 @@ section Linus Computer Science 101.
Nuff said.  If your code deviates too much from this, it is likely
Nuff said.  If your code deviates too much from this, it is likely
to be rejected without further review, and without comment.
to be rejected without further review, and without comment.


Once significant exception is when moving code from one file to
One significant exception is when moving code from one file to
another in this case you should not modify the moved code at all in
another -- in this case you should not modify the moved code at all in
the same patch which moves it.  This clearly delineates the act of
the same patch which moves it.  This clearly delineates the act of
moving the code and your changes.  This greatly aids review of the
moving the code and your changes.  This greatly aids review of the
actual differences and allows tools to better track the history of
actual differences and allows tools to better track the history of
+556 −0

File added.

Preview size limit exceeded, changes collapsed.

+0 −18
Original line number Original line Diff line number Diff line
@@ -257,22 +257,6 @@ void class_device_remove_file(struct class_device * class_dev,
		sysfs_remove_file(&class_dev->kobj, &attr->attr);
		sysfs_remove_file(&class_dev->kobj, &attr->attr);
}
}


int class_device_create_bin_file(struct class_device *class_dev,
				 struct bin_attribute *attr)
{
	int error = -EINVAL;
	if (class_dev)
		error = sysfs_create_bin_file(&class_dev->kobj, attr);
	return error;
}

void class_device_remove_bin_file(struct class_device *class_dev,
				  struct bin_attribute *attr)
{
	if (class_dev)
		sysfs_remove_bin_file(&class_dev->kobj, attr);
}

static ssize_t
static ssize_t
class_device_attr_show(struct kobject * kobj, struct attribute * attr,
class_device_attr_show(struct kobject * kobj, struct attribute * attr,
		       char * buf)
		       char * buf)
@@ -885,8 +869,6 @@ EXPORT_SYMBOL_GPL(class_device_create);
EXPORT_SYMBOL_GPL(class_device_destroy);
EXPORT_SYMBOL_GPL(class_device_destroy);
EXPORT_SYMBOL_GPL(class_device_create_file);
EXPORT_SYMBOL_GPL(class_device_create_file);
EXPORT_SYMBOL_GPL(class_device_remove_file);
EXPORT_SYMBOL_GPL(class_device_remove_file);
EXPORT_SYMBOL_GPL(class_device_create_bin_file);
EXPORT_SYMBOL_GPL(class_device_remove_bin_file);


EXPORT_SYMBOL_GPL(class_interface_register);
EXPORT_SYMBOL_GPL(class_interface_register);
EXPORT_SYMBOL_GPL(class_interface_unregister);
EXPORT_SYMBOL_GPL(class_interface_unregister);
+3 −3
Original line number Original line Diff line number Diff line
@@ -1228,18 +1228,18 @@ int device_rename(struct device *dev, char *new_name)
			sysfs_remove_link(&dev->parent->kobj, old_class_name);
			sysfs_remove_link(&dev->parent->kobj, old_class_name);
		}
		}
	}
	}
#endif
#else

	if (dev->class) {
	if (dev->class) {
		sysfs_remove_link(&dev->class->subsys.kobj, old_device_name);
		sysfs_remove_link(&dev->class->subsys.kobj, old_device_name);
		error = sysfs_create_link(&dev->class->subsys.kobj, &dev->kobj,
		error = sysfs_create_link(&dev->class->subsys.kobj, &dev->kobj,
					  dev->bus_id);
					  dev->bus_id);
		if (error) {
		if (error) {
			/* Uh... how to unravel this if restoring can fail? */
			dev_err(dev, "%s: sysfs_create_symlink failed (%d)\n",
			dev_err(dev, "%s: sysfs_create_symlink failed (%d)\n",
				__FUNCTION__, error);
				__FUNCTION__, error);
		}
		}
	}
	}
#endif

out:
out:
	put_device(dev);
	put_device(dev);


+2 −2
Original line number Original line Diff line number Diff line
@@ -132,7 +132,7 @@ struct dentry *sysfs_get_dentry(struct sysfs_dirent *sd)
 *	RETURNS:
 *	RETURNS:
 *	Pointer to @sd on success, NULL on failure.
 *	Pointer to @sd on success, NULL on failure.
 */
 */
struct sysfs_dirent *sysfs_get_active(struct sysfs_dirent *sd)
static struct sysfs_dirent *sysfs_get_active(struct sysfs_dirent *sd)
{
{
	if (unlikely(!sd))
	if (unlikely(!sd))
		return NULL;
		return NULL;
@@ -161,7 +161,7 @@ struct sysfs_dirent *sysfs_get_active(struct sysfs_dirent *sd)
 *	Put an active reference to @sd.  This function is noop if @sd
 *	Put an active reference to @sd.  This function is noop if @sd
 *	is NULL.
 *	is NULL.
 */
 */
void sysfs_put_active(struct sysfs_dirent *sd)
static void sysfs_put_active(struct sysfs_dirent *sd)
{
{
	struct completion *cmpl;
	struct completion *cmpl;
	int v;
	int v;
Loading