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 drivers (2 of 3 files). Show all

Unified · Split

2 files
  1. drivers/dca/dca-core.c +2 −1
  2. drivers/dma/ioat/dca.c +1 −1
drivers/dca/dca-core.c+2−1
@@ -321,7 +321,8 @@ EXPORT_SYMBOL_GPL(dca_get_tag); · 320 unmodified lines
321 * @ops - pointer to struct of dca operation function pointers321 * @ops - pointer to struct of dca operation function pointers
322 * @priv_size - size of extra mem to be added for provider's needs322 * @priv_size - size of extra mem to be added for provider's needs
323 */323 */
324struct dca_provider *alloc_dca_provider(struct dca_ops *ops, int priv_size)324struct dca_provider *alloc_dca_provider(const struct dca_ops *ops,
325 int priv_size)
325{326{
326 struct dca_provider *dca;327 struct dca_provider *dca;
327 int alloc_size;328 int alloc_size;
drivers/dma/ioat/dca.c+1−1
@@ -224,7 +224,7 @@ static u8 ioat_dca_get_tag(struct dca_provider *dca, · 223 unmodified lines
224 return tag;224 return tag;
225}225}
226 226
227static struct dca_ops ioat_dca_ops = {227static const struct dca_ops ioat_dca_ops = {
228 .add_requester = ioat_dca_add_requester,228 .add_requester = ioat_dca_add_requester,
229 .remove_requester = ioat_dca_remove_requester,229 .remove_requester = ioat_dca_remove_requester,
230 .get_tag = ioat_dca_get_tag,230 .get_tag = ioat_dca_get_tag,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t