Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1452758
| From | Tal Shorer <tal.shorer@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 5/5] usb: dwc3: ulpi: make dwc3_ulpi_ops constant |
| Date | 2016-07-31 01:30 +0200 |
| Message-ID | <s0LRE-Ch-15@gated-at.bofh.it> (permalink) |
| References | <s0LRD-Ch-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
ulpi_register_interface() accepts a const struct ulpi_ops and dwc3
doesn't perform any changes to this struct at runtime, so there's no
reason it shouldn't be constant.
Signed-off-by: Tal Shorer <tal.shorer@gmail.com>
---
drivers/usb/dwc3/ulpi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/dwc3/ulpi.c b/drivers/usb/dwc3/ulpi.c
index 51ac939..bd86f84 100644
--- a/drivers/usb/dwc3/ulpi.c
+++ b/drivers/usb/dwc3/ulpi.c
@@ -65,7 +65,7 @@ static int dwc3_ulpi_write(struct device *dev, u8 addr, u8 val)
return dwc3_ulpi_busyloop(dwc);
}
-static struct ulpi_ops dwc3_ulpi_ops = {
+static const struct ulpi_ops dwc3_ulpi_ops = {
.read = dwc3_ulpi_read,
.write = dwc3_ulpi_write,
};
--
2.7.4
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 0/5] usb: ulpi: remove "dev" field from struct ulpi_ops Tal Shorer <tal.shorer@gmail.com> - 2016-07-31 01:30 +0200 [PATCH 1/5] usb: ulpi: move setting of ulpi->dev parent up in ulpi_register() Tal Shorer <tal.shorer@gmail.com> - 2016-07-31 01:30 +0200 [PATCH 2/5] usb: ulpi: change operations api to pass parent device directly Tal Shorer <tal.shorer@gmail.com> - 2016-07-31 01:30 +0200 [PATCH 4/5] usb: ulpi: make ops struct constant Tal Shorer <tal.shorer@gmail.com> - 2016-07-31 01:30 +0200 [PATCH 3/5] usb: ulpi: remove "dev" field from struct ulpi_ops Tal Shorer <tal.shorer@gmail.com> - 2016-07-31 01:30 +0200 [PATCH 5/5] usb: dwc3: ulpi: make dwc3_ulpi_ops constant Tal Shorer <tal.shorer@gmail.com> - 2016-07-31 01:30 +0200
csiph-web