X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Fflash%2Fnor%2Focl.c;h=d2a6594189d1f2a864a30f10667eb570875ff1d7;hb=0a13ca1a8a83119a4e1ffba13a6a8d1977591bc5;hp=c547d9a1746c528ff4c53604b074ea160535d989;hpb=565f8481c7b71614a05d79ab79af8610d2535a81;p=openocd.git
diff --git a/src/flash/nor/ocl.c b/src/flash/nor/ocl.c
index c547d9a174..d2a6594189 100644
--- a/src/flash/nor/ocl.c
+++ b/src/flash/nor/ocl.c
@@ -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 . *
***************************************************************************/
#ifdef HAVE_CONFIG_H
@@ -32,16 +30,6 @@ struct ocl_priv {
unsigned int bufalign;
};
-static int ocl_erase_check(struct flash_bank *bank)
-{
- return ERROR_OK;
-}
-
-static int ocl_protect_check(struct flash_bank *bank)
-{
- return ERROR_OK;
-}
-
/* flash_bank ocl 0 0 0 0 */
FLASH_BANK_COMMAND_HANDLER(ocl_flash_bank_command)
{
@@ -113,11 +101,6 @@ static int ocl_erase(struct flash_bank *bank, int first, int last)
return ERROR_OK;
}
-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, const uint8_t *buffer, uint32_t offset, uint32_t count)
{
struct ocl_priv *ocl = bank->driver_priv;
@@ -331,15 +314,14 @@ static int ocl_auto_probe(struct flash_bank *bank)
return ERROR_OK;
}
-struct flash_driver ocl_flash = {
+const struct flash_driver ocl_flash = {
.name = "ocl",
.flash_bank_command = ocl_flash_bank_command,
.erase = ocl_erase,
- .protect = ocl_protect,
.write = ocl_write,
.read = default_flash_read,
.probe = ocl_probe,
- .erase_check = ocl_erase_check,
- .protect_check = ocl_protect_check,
+ .erase_check = default_flash_blank_check,
.auto_probe = ocl_auto_probe,
+ .free_driver_priv = default_flash_free_driver_priv,
};