Lines Matching refs:res_attr
868 struct bin_attribute *res_attr;
870 res_attr = pdev->res_attr[i];
871 if (res_attr) {
872 sysfs_remove_bin_file(&pdev->dev.kobj, res_attr);
873 kfree(res_attr);
876 res_attr = pdev->res_attr_wc[i];
877 if (res_attr) {
878 sysfs_remove_bin_file(&pdev->dev.kobj, res_attr);
879 kfree(res_attr);
888 struct bin_attribute *res_attr;
891 res_attr = kzalloc(sizeof(*res_attr) + name_len, GFP_ATOMIC);
892 if (res_attr) {
893 char *res_attr_name = (char *)(res_attr + 1);
895 sysfs_bin_attr_init(res_attr);
897 pdev->res_attr_wc[num] = res_attr;
899 res_attr->mmap = pci_mmap_resource_wc;
901 pdev->res_attr[num] = res_attr;
903 res_attr->mmap = pci_mmap_resource_uc;
906 res_attr->read = pci_read_resource_io;
907 res_attr->write = pci_write_resource_io;
909 res_attr->attr.name = res_attr_name;
910 res_attr->attr.mode = S_IRUSR | S_IWUSR;
911 res_attr->size = pci_resource_len(pdev, num);
912 res_attr->private = &pdev->resource[num];
913 retval = sysfs_create_bin_file(&pdev->dev.kobj, res_attr);