From 428390047f5fdc13bf60f2d2e2671d1afb120459 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Tue, 21 Apr 2015 08:11:50 -0300 Subject: [PATCH] fw/atusb/ (dfu_flash_ops): make const --- atusb/fw/flash.c | 8 ++++---- atusb/fw/usb/dfu.h | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/atusb/fw/flash.c b/atusb/fw/flash.c index 75b5782..9af06eb 100644 --- a/atusb/fw/flash.c +++ b/atusb/fw/flash.c @@ -1,8 +1,8 @@ /* * fw/flash.c - Board-specific flash functions * - * Written 2011, 2013, 2014 by Werner Almesberger - * Copyright 2011, 2013, 2014 Werner Almesberger + * Written 2011, 2013-2015 by Werner Almesberger + * Copyright 2011, 2013-2015 Werner Almesberger * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -85,7 +85,7 @@ static uint16_t flash_read(uint8_t *buf, uint16_t size) } -static struct dfu_flash_ops flash_ops = { +const static struct dfu_flash_ops flash_ops = { .start = flash_start, .can_write = flash_can_write, .write = flash_write, @@ -94,4 +94,4 @@ static struct dfu_flash_ops flash_ops = { }; -struct dfu_flash_ops *dfu_flash_ops = &flash_ops; +const struct dfu_flash_ops *dfu_flash_ops = &flash_ops; diff --git a/atusb/fw/usb/dfu.h b/atusb/fw/usb/dfu.h index 9637af2..bc35bbc 100644 --- a/atusb/fw/usb/dfu.h +++ b/atusb/fw/usb/dfu.h @@ -1,8 +1,8 @@ /* * boot/dfu.h - DFU protocol constants and data structures * - * Written 2008, 2011, 2013, 2014 by Werner Almesberger - * Copyright 2008, 2011, 2013, 2014 Werner Almesberger + * Written 2008, 2011, 2013-2015 by Werner Almesberger + * Copyright 2008, 2011, 2013-2015 Werner Almesberger * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -107,7 +107,7 @@ struct dfu_flash_ops { }; extern struct dfu dfu; -extern struct dfu_flash_ops *dfu_flash_ops; +extern const struct dfu_flash_ops *dfu_flash_ops; bool dfu_setup_common(const struct setup_request *setup);