GNU Linux-libre 4.14.332-gnu1
[releases.git] / drivers / staging / media / atomisp / i2c / imx / otp.c
1 /*
2  * Copyright (c) 2013 Intel Corporation. All Rights Reserved.
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License version
6  * 2 as published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
16  * 02110-1301, USA.
17  *
18  */
19 #include <linux/device.h>
20 #include <linux/errno.h>
21 #include <linux/i2c.h>
22 #include <linux/kernel.h>
23 #include <linux/mm.h>
24 #include <linux/string.h>
25 #include <linux/types.h>
26 #include <media/v4l2-device.h>
27
28 void *dummy_otp_read(struct v4l2_subdev *sd, u8 dev_addr,
29         u32 start_addr, u32 size)
30 {
31         struct i2c_client *client = v4l2_get_subdevdata(sd);
32         u8 *buf;
33
34         buf = devm_kzalloc(&client->dev, size, GFP_KERNEL);
35         if (!buf)
36                 return ERR_PTR(-ENOMEM);
37
38         return buf;
39 }