diff options
Diffstat (limited to 'arch/arm/mach-mxs/ocotp.c')
-rw-r--r-- | arch/arm/mach-mxs/ocotp.c | 32 |
1 files changed, 13 insertions, 19 deletions
diff --git a/arch/arm/mach-mxs/ocotp.c b/arch/arm/mach-mxs/ocotp.c index a4df39c2e9..9e86ac9559 100644 --- a/arch/arm/mach-mxs/ocotp.c +++ b/arch/arm/mach-mxs/ocotp.c @@ -1,15 +1,8 @@ -/* - * ocotp.c - barebox driver for the On-Chip One Time Programmable for MXS - * - * Copyright (C) 2012 by Wolfram Sang, Pengutronix e.K. - * based on the kernel driver which is - * Copyright 2010 Freescale Semiconductor, Inc. All Rights Reserved. - * - * 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - */ +// SPDX-License-Identifier: GPL-2.0-or-later +// SPDX-FileCopyrightText: 2012 Wolfram Sang, Pengutronix e.K. +// SPDX-FileCopyrightText: 2010 Freescale Semiconductor, Inc. + +/* ocotp.c - barebox driver for the On-Chip One Time Programmable for MXS */ #include <common.h> #include <init.h> @@ -25,9 +18,9 @@ #include <linux/clk.h> #include <linux/err.h> -#include <mach/generic.h> -#include <mach/ocotp.h> -#include <mach/power.h> +#include <mach/mxs/generic.h> +#include <mach/mxs/ocotp.h> +#include <mach/mxs/power.h> #define DRIVERNAME "ocotp" @@ -43,7 +36,7 @@ #define OCOTP_WORD_OFFSET 0x20 struct ocotp_priv { - struct device_d dev; + struct device dev; struct cdev cdev; void __iomem *base; unsigned int write_enable; @@ -176,7 +169,7 @@ static struct cdev_operations mxs_ocotp_ops = { .read = mxs_ocotp_cdev_read, }; -static int mxs_ocotp_probe(struct device_d *dev) +static int mxs_ocotp_probe(struct device *dev) { struct resource *iores; int err; @@ -222,8 +215,9 @@ static __maybe_unused struct of_device_id mxs_ocotp_compatible[] = { /* sentinel */ } }; +MODULE_DEVICE_TABLE(of, mxs_ocotp_compatible); -static struct driver_d mxs_ocotp_driver = { +static struct driver mxs_ocotp_driver = { .name = DRIVERNAME, .probe = mxs_ocotp_probe, .of_compatible = DRV_OF_COMPAT(mxs_ocotp_compatible), @@ -236,7 +230,7 @@ int mxs_ocotp_read(void *buf, int count, int offset) struct cdev *cdev; int ret; - cdev = cdev_open(DRIVERNAME, O_RDONLY); + cdev = cdev_open_by_name(DRIVERNAME, O_RDONLY); if (!cdev) return -ENODEV; |