History

dmaengine: ioatdma: constify dca_ops structures

The dca_ops structure is never modified, so declare it as const. Done with the help of Coccinelle.

Julia Lawall committed 11 years ago

Commit 2bb129e1 parent d3cd63f3 files · +6 −4Browse files

Showing the changes to include (1 of 3 files). Show all

Unified · Split

include/linux/dca.h+3−2
@@ -34,7 +34,7 @@ void dca_unregister_notify(struct notifier_block *nb); · 33 unmodified lines
34 34
35struct dca_provider {35struct dca_provider {
36 struct list_head node;36 struct list_head node;
37 struct dca_ops *ops;37 const struct dca_ops *ops;
38 struct device *cd;38 struct device *cd;
39 int id;39 int id;
40};40};
@@ -53,7 +53,8 @@ struct dca_ops { · 12 unmodified lines
53 int (*dev_managed) (struct dca_provider *, struct device *);53 int (*dev_managed) (struct dca_provider *, struct device *);
54};54};
55 55
56struct dca_provider *alloc_dca_provider(struct dca_ops *ops, int priv_size);56struct dca_provider *alloc_dca_provider(const struct dca_ops *ops,
57 int priv_size);
57void free_dca_provider(struct dca_provider *dca);58void free_dca_provider(struct dca_provider *dca);
58int register_dca_provider(struct dca_provider *dca, struct device *dev);59int register_dca_provider(struct dca_provider *dca, struct device *dev);
59void unregister_dca_provider(struct dca_provider *dca, struct device *dev);60void unregister_dca_provider(struct dca_provider *dca, struct device *dev);