usb: typec: Make the attributes read-only when writing is not possible
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>
Tue, 11 Feb 2020 11:25:26 +0000 (14:25 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 12 Feb 2020 18:51:21 +0000 (10:51 -0800)
commitb747038d9d14a2ca9e6f139a8584507d5aed8634
tree1ba9f3816390a704f39e6e4df86f590ab6b112b2
parent882f7a4dae1db3f33934453d4194b829cd8ec5a5
usb: typec: Make the attributes read-only when writing is not possible

This affects the read-writable attribute files. Before this
there was no way for the user to know is changing the value
supported or not.

>From now on those attribute files will be made read-only
unless the underlying driver supports changing of the value.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20200211112531.86510-2-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/class.c