Lines Matching refs:chattr
143 struct hidma_chan_attr *chattr; in show_values_channel() local
147 chattr = container_of(attr, struct hidma_chan_attr, attr); in show_values_channel()
148 mdev = chattr->mdev; in show_values_channel()
150 sprintf(buf, "%d\n", mdev->priority[chattr->index]); in show_values_channel()
152 sprintf(buf, "%d\n", mdev->weight[chattr->index]); in show_values_channel()
161 struct hidma_chan_attr *chattr; in set_values_channel() local
166 chattr = container_of(attr, struct hidma_chan_attr, attr); in set_values_channel()
167 mdev = chattr->mdev; in set_values_channel()
174 rc = set_priority(mdev, chattr->index, tmp); in set_values_channel()
178 rc = set_weight(mdev, chattr->index, tmp); in set_values_channel()
212 struct hidma_chan_attr *chattr; in create_sysfs_entry_channel() local
215 chattr = devm_kmalloc(&mdev->pdev->dev, sizeof(*chattr), GFP_KERNEL); in create_sysfs_entry_channel()
216 if (!chattr) in create_sysfs_entry_channel()
223 chattr->mdev = mdev; in create_sysfs_entry_channel()
224 chattr->index = index; in create_sysfs_entry_channel()
225 chattr->attr.attr.name = name_copy; in create_sysfs_entry_channel()
226 chattr->attr.attr.mode = mode; in create_sysfs_entry_channel()
227 chattr->attr.show = show_values_channel; in create_sysfs_entry_channel()
228 chattr->attr.store = set_values_channel; in create_sysfs_entry_channel()
229 sysfs_attr_init(&chattr->attr.attr); in create_sysfs_entry_channel()
231 return sysfs_create_file(parent, &chattr->attr.attr); in create_sysfs_entry_channel()