Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 67989
b: refs/heads/master
c: 5a7ad7f
h: refs/heads/master
i:
  67987: 9da9318
v: v3
  • Loading branch information
Tejun Heo authored and Greg Kroah-Hartman committed Oct 12, 2007
1 parent 93642ac commit 7147a14
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 108 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 59f69015684b3de7b9472be9a81b1a978f93a496
refs/heads/master: 5a7ad7f044941316dc98eda2a087a12a7a50649d
60 changes: 0 additions & 60 deletions trunk/drivers/pci/hotplug/pci_hotplug_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -694,66 +694,6 @@ int __must_check pci_hp_change_slot_info(struct hotplug_slot *slot,
if ((slot == NULL) || (info == NULL))
return -ENODEV;

/*
* check all fields in the info structure, and update timestamps
* for the files referring to the fields that have now changed.
*/
if ((has_power_file(slot) == 0) &&
(slot->info->power_status != info->power_status)) {
retval = sysfs_update_file(&slot->kobj,
&hotplug_slot_attr_power.attr);
if (retval)
return retval;
}

if ((has_attention_file(slot) == 0) &&
(slot->info->attention_status != info->attention_status)) {
retval = sysfs_update_file(&slot->kobj,
&hotplug_slot_attr_attention.attr);
if (retval)
return retval;
}

if ((has_latch_file(slot) == 0) &&
(slot->info->latch_status != info->latch_status)) {
retval = sysfs_update_file(&slot->kobj,
&hotplug_slot_attr_latch.attr);
if (retval)
return retval;
}

if ((has_adapter_file(slot) == 0) &&
(slot->info->adapter_status != info->adapter_status)) {
retval = sysfs_update_file(&slot->kobj,
&hotplug_slot_attr_presence.attr);
if (retval)
return retval;
}

if ((has_address_file(slot) == 0) &&
(slot->info->address != info->address)) {
retval = sysfs_update_file(&slot->kobj,
&hotplug_slot_attr_address.attr);
if (retval)
return retval;
}

if ((has_max_bus_speed_file(slot) == 0) &&
(slot->info->max_bus_speed != info->max_bus_speed)) {
retval = sysfs_update_file(&slot->kobj,
&hotplug_slot_attr_max_bus_speed.attr);
if (retval)
return retval;
}

if ((has_cur_bus_speed_file(slot) == 0) &&
(slot->info->cur_bus_speed != info->cur_bus_speed)) {
retval = sysfs_update_file(&slot->kobj,
&hotplug_slot_attr_cur_bus_speed.attr);
if (retval)
return retval;
}

memcpy (slot->info, info, sizeof (struct hotplug_slot_info));

return 0;
Expand Down
40 changes: 0 additions & 40 deletions trunk/fs/sysfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
*/

#include <linux/module.h>
#include <linux/fsnotify.h>
#include <linux/kobject.h>
#include <linux/namei.h>
#include <linux/poll.h>
Expand Down Expand Up @@ -453,44 +452,6 @@ int sysfs_add_file_to_group(struct kobject *kobj,
}
EXPORT_SYMBOL_GPL(sysfs_add_file_to_group);


/**
* sysfs_update_file - update the modified timestamp on an object attribute.
* @kobj: object we're acting for.
* @attr: attribute descriptor.
*/
int sysfs_update_file(struct kobject * kobj, const struct attribute * attr)
{
struct sysfs_dirent *victim_sd = NULL;
struct dentry *victim = NULL;
int rc;

rc = -ENOENT;
victim_sd = sysfs_get_dirent(kobj->sd, attr->name);
if (!victim_sd)
goto out;

mutex_lock(&sysfs_rename_mutex);
victim = sysfs_get_dentry(victim_sd);
mutex_unlock(&sysfs_rename_mutex);
if (IS_ERR(victim)) {
rc = PTR_ERR(victim);
victim = NULL;
goto out;
}

mutex_lock(&victim->d_inode->i_mutex);
victim->d_inode->i_mtime = CURRENT_TIME;
fsnotify_modify(victim);
mutex_unlock(&victim->d_inode->i_mutex);
rc = 0;
out:
dput(victim);
sysfs_put(victim_sd);
return rc;
}


/**
* sysfs_chmod_file - update the modified mode value on an object attribute.
* @kobj: object we're acting for.
Expand Down Expand Up @@ -641,4 +602,3 @@ EXPORT_SYMBOL_GPL(sysfs_schedule_callback);

EXPORT_SYMBOL_GPL(sysfs_create_file);
EXPORT_SYMBOL_GPL(sysfs_remove_file);
EXPORT_SYMBOL_GPL(sysfs_update_file);
7 changes: 0 additions & 7 deletions trunk/include/linux/sysfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ int __must_check sysfs_move_dir(struct kobject *kobj,

int __must_check sysfs_create_file(struct kobject *kobj,
const struct attribute *attr);
int __must_check sysfs_update_file(struct kobject *kobj,
const struct attribute *attr);
int __must_check sysfs_chmod_file(struct kobject *kobj, struct attribute *attr,
mode_t mode);
void sysfs_remove_file(struct kobject *kobj, const struct attribute *attr);
Expand Down Expand Up @@ -149,11 +147,6 @@ static inline int sysfs_create_file(struct kobject *kobj,
return 0;
}

static inline int sysfs_update_file(struct kobject *kobj,
const struct attribute *attr)
{
return 0;
}
static inline int sysfs_chmod_file(struct kobject *kobj,
struct attribute *attr, mode_t mode)
{
Expand Down

0 comments on commit 7147a14

Please sign in to comment.