diff options
Diffstat (limited to 'drivers/usb/chipidea/otg_fsm.c')
-rw-r--r-- | drivers/usb/chipidea/otg_fsm.c | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/drivers/usb/chipidea/otg_fsm.c b/drivers/usb/chipidea/otg_fsm.c index 5ea0246f650d..6ed4b00dba96 100644 --- a/drivers/usb/chipidea/otg_fsm.c +++ b/drivers/usb/chipidea/otg_fsm.c @@ -1,13 +1,10 @@ +// SPDX-License-Identifier: GPL-2.0 /* * otg_fsm.c - ChipIdea USB IP core OTG FSM driver * * Copyright (C) 2014 Freescale Semiconductor, Inc. * * Author: Jun Li - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. */ /* @@ -32,7 +29,7 @@ /* Add for otg: interact with user space app */ static ssize_t -get_a_bus_req(struct device *dev, struct device_attribute *attr, char *buf) +a_bus_req_show(struct device *dev, struct device_attribute *attr, char *buf) { char *next; unsigned size, t; @@ -48,7 +45,7 @@ get_a_bus_req(struct device *dev, struct device_attribute *attr, char *buf) } static ssize_t -set_a_bus_req(struct device *dev, struct device_attribute *attr, +a_bus_req_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct ci_hdrc *ci = dev_get_drvdata(dev); @@ -78,10 +75,10 @@ set_a_bus_req(struct device *dev, struct device_attribute *attr, return count; } -static DEVICE_ATTR(a_bus_req, S_IRUGO | S_IWUSR, get_a_bus_req, set_a_bus_req); +static DEVICE_ATTR_RW(a_bus_req); static ssize_t -get_a_bus_drop(struct device *dev, struct device_attribute *attr, char *buf) +a_bus_drop_show(struct device *dev, struct device_attribute *attr, char *buf) { char *next; unsigned size, t; @@ -97,7 +94,7 @@ get_a_bus_drop(struct device *dev, struct device_attribute *attr, char *buf) } static ssize_t -set_a_bus_drop(struct device *dev, struct device_attribute *attr, +a_bus_drop_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct ci_hdrc *ci = dev_get_drvdata(dev); @@ -118,11 +115,10 @@ set_a_bus_drop(struct device *dev, struct device_attribute *attr, return count; } -static DEVICE_ATTR(a_bus_drop, S_IRUGO | S_IWUSR, get_a_bus_drop, - set_a_bus_drop); +static DEVICE_ATTR_RW(a_bus_drop); static ssize_t -get_b_bus_req(struct device *dev, struct device_attribute *attr, char *buf) +b_bus_req_show(struct device *dev, struct device_attribute *attr, char *buf) { char *next; unsigned size, t; @@ -138,7 +134,7 @@ get_b_bus_req(struct device *dev, struct device_attribute *attr, char *buf) } static ssize_t -set_b_bus_req(struct device *dev, struct device_attribute *attr, +b_bus_req_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct ci_hdrc *ci = dev_get_drvdata(dev); @@ -163,10 +159,10 @@ set_b_bus_req(struct device *dev, struct device_attribute *attr, return count; } -static DEVICE_ATTR(b_bus_req, S_IRUGO | S_IWUSR, get_b_bus_req, set_b_bus_req); +static DEVICE_ATTR_RW(b_bus_req); static ssize_t -set_a_clr_err(struct device *dev, struct device_attribute *attr, +a_clr_err_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct ci_hdrc *ci = dev_get_drvdata(dev); @@ -183,7 +179,7 @@ set_a_clr_err(struct device *dev, struct device_attribute *attr, return count; } -static DEVICE_ATTR(a_clr_err, S_IWUSR, NULL, set_a_clr_err); +static DEVICE_ATTR_WO(a_clr_err); static struct attribute *inputs_attrs[] = { &dev_attr_a_bus_req.attr, |