[PATCH v3 11/14] staging: most: configfs: make create attributes write-only

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Reading the create attribute that triggers the creation of a link to
a certain channel is not necessary. Hence, it is being removed.

Signed-off-by: Christian Gromm <christian.gromm@xxxxxxxxxxxxx>
---
v2:
v3:

 drivers/staging/most/configfs.c | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/most/configfs.c b/drivers/staging/most/configfs.c
index ee1ad32..9d8b679 100644
--- a/drivers/staging/most/configfs.c
+++ b/drivers/staging/most/configfs.c
@@ -103,11 +103,6 @@ static struct mdev_link *to_mdev_link(struct config_item *item)
 	return container_of(item, struct mdev_link, item);
 }
 
-static ssize_t mdev_link_create_show(struct config_item *item, char *page)
-{
-	return snprintf(page, PAGE_SIZE, "%d\n", to_mdev_link(item)->create);
-}
-
 static int set_config_and_add_link(struct mdev_link *mdev_link)
 {
 	int i;
@@ -329,7 +324,7 @@ static ssize_t mdev_link_dbr_size_store(struct config_item *item,
 	return count;
 }
 
-CONFIGFS_ATTR(mdev_link_, create);
+CONFIGFS_ATTR_WO(mdev_link_, create);
 CONFIGFS_ATTR(mdev_link_, mdev);
 CONFIGFS_ATTR(mdev_link_, channel);
 CONFIGFS_ATTR(mdev_link_, comp);
@@ -477,11 +472,6 @@ static struct config_item *most_snd_grp_make_item(struct config_group *group,
 	return &mdev_link->item;
 }
 
-static ssize_t most_snd_grp_create_show(struct config_item *item, char *page)
-{
-	return snprintf(page, PAGE_SIZE, "%d\n", to_most_snd_grp(item)->create);
-}
-
 static ssize_t most_snd_grp_create_store(struct config_item *item,
 					 const char *page, size_t count)
 {
@@ -501,7 +491,7 @@ static ssize_t most_snd_grp_create_store(struct config_item *item,
 	return count;
 }
 
-CONFIGFS_ATTR(most_snd_grp_, create);
+CONFIGFS_ATTR_WO(most_snd_grp_, create);
 
 static struct configfs_attribute *most_snd_grp_attrs[] = {
 	&most_snd_grp_attr_create,
-- 
2.7.4

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux