stm32l4: Handle failing flash_size read like on other devices.
[fw/openocd] / src / flash / nor / ocl.c
index 6b297b0d366c929c8d8dfa18d8a25d797f9e72e5..4ae5652194b784bd703aac0a9b5dcc66a2a11c5d 100644 (file)
@@ -13,9 +13,7 @@
  *   GNU General Public License for more details.                          *
  *                                                                         *
  *   You should have received a copy of the GNU General Public License     *
- *   along with this program; if not, write to the                         *
- *   Free Software Foundation, Inc.,                                       *
- *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.           *
+ *   along with this program.  If not, see <http://www.gnu.org/licenses/>. *
  ***************************************************************************/
 
 #ifdef HAVE_CONFIG_H
@@ -118,7 +116,7 @@ static int ocl_protect(struct flash_bank *bank, int set, int first, int last)
        return ERROR_OK;
 }
 
-static int ocl_write(struct flash_bank *bank, uint8_t *buffer, uint32_t offset, uint32_t count)
+static int ocl_write(struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count)
 {
        struct ocl_priv *ocl = bank->driver_priv;
        int retval;