From 1e3b73a95793555860512008035f6822406a2a79 Mon Sep 17 00:00:00 2001 From: Jason Gunthorpe Date: Tue, 26 Nov 2013 13:30:42 -0700 Subject: tpm: Pull all driver sysfs code into tpm-sysfs.c The tpm core now sets up and controls all sysfs attributes, instead of having each driver have a unique take on it. All drivers now now have a uniform set of attributes, and no sysfs related entry points are exported from the tpm core module. This also uses the new method used to declare sysfs attributes with DEVICE_ATTR_RO and 'struct attribute *' Signed-off-by: Jason Gunthorpe [phuewe: had to apply the tpm_i2c_atmel part manually due to commit 191ffc6bde3fc tpm/tpm_i2c_atmel: fix coccinelle warnings] Signed-off-by: Peter Huewe --- drivers/char/tpm/tpm-interface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/char/tpm/tpm-interface.c') diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c index 3f8bddf8f7ed..389d483a887c 100644 --- a/drivers/char/tpm/tpm-interface.c +++ b/drivers/char/tpm/tpm-interface.c @@ -879,7 +879,7 @@ void tpm_remove_hardware(struct device *dev) synchronize_rcu(); tpm_dev_del_device(chip); - sysfs_remove_group(&dev->kobj, chip->vendor.attr_group); + tpm_sysfs_del_device(chip); tpm_remove_ppi(&dev->kobj); tpm_bios_log_teardown(chip->bios_dir); @@ -1095,7 +1095,7 @@ struct tpm_chip *tpm_register_hardware(struct device *dev, if (tpm_dev_add_device(chip)) goto put_device; - if (sysfs_create_group(&dev->kobj, chip->vendor.attr_group)) + if (tpm_sysfs_add_device(chip)) goto del_misc; if (tpm_add_ppi(&dev->kobj)) -- cgit v1.2.3-59-g8ed1b