lkml.org 
[lkml]   [2005]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 10 of 12] Fix Tpm driver -- sysfs owernship changes
On Wed, Apr 27, 2005 at 05:19:03PM -0500, Kylene Hall wrote:
> - device_remove_file(&pci_dev->dev, &dev_attr_pubek);
> - device_remove_file(&pci_dev->dev, &dev_attr_pcrs);
> - device_remove_file(&pci_dev->dev, &dev_attr_caps);
> + for (i = 0; i < TPM_NUM_ATTR; i++)
> + device_remove_file(&pci_dev->dev, &chip->vendor->attr[i]);

Use an attribute group, instead of this. That will allow you to get
rid of the TPM_NUM_ATTR value, and this looney macro:

> +#define TPM_DEVICE_ATTRS { \
> + __ATTR(pubek, S_IRUGO, tpm_show_pubek, NULL), \
> + __ATTR(pcrs, S_IRUGO, tpm_show_pcrs, NULL), \
> + __ATTR(caps, S_IRUGO, tpm_show_caps, NULL), \
> + __ATTR(cancel, S_IWUSR | S_IWGRP, NULL, tpm_store_cancel) }

thanks,

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-04-28 06:23    [W:0.068 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site