aboutsummaryrefslogtreecommitdiff
path: root/drivers/misc/eeprom/eeprom.c
AgeCommit message (Collapse)AuthorFilesLines
2020-09-21misc: eeprom: use helper to get i2c_client from kobjWolfram Sang1-1/+1
Slightly easier to read. Signed-off-by: Wolfram Sang <[email protected]> Reviewed-by: Jean Delvare <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2019-10-04eeprom: Warn that the driver is deprecatedJean Delvare1-0/+4
Deprecating the driver in Kconfig is one thing, but we also need to let the users themselves know. Log a warning each time a device is bound to the deprecated eeprom driver. Signed-off-by: Jean Delvare <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Link: https://lore.kernel.org/r/20191002104844.1dc4d8f3@endymion Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-05-30treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157Thomas Gleixner1-10/+1
Based on 3 normalized pattern(s): 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 this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details 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 [author] [kishon] [vijay] [abraham] [i] [kishon]@[ti] [com] this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details 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 [author] [graeme] [gregory] [gg]@[slimlogic] [co] [uk] [author] [kishon] [vijay] [abraham] [i] [kishon]@[ti] [com] [based] [on] [twl6030]_[usb] [c] [author] [hema] [hk] [hemahk]@[ti] [com] this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 1105 file(s). Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Allison Randal <[email protected]> Reviewed-by: Richard Fontana <[email protected]> Reviewed-by: Kate Stewart <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2017-08-28MISC: add const to bin_attribute structuresBhumika Goyal1-1/+1
Add const to bin_attribute structures as they are only passed to the functions sysfs_{remove/create}_bin_file. The arguments passed are of type const, so declare the structures to be const. Done using Coccinelle. @m disable optional_qualifier@ identifier s; position p; @@ static struct bin_attribute s@p={...}; @okay1@ position p; identifier m.s; @@ ( sysfs_create_bin_file(...,&s@p,...) | sysfs_remove_bin_file(...,&s@p,...) ) @bad@ position p!={m.p,okay1.p}; identifier m.s; @@ s@p @change depends on !bad disable optional_qualifier@ identifier m.s; @@ static +const struct bin_attribute s={...}; Signed-off-by: Bhumika Goyal <[email protected]> Reviewed-by: Jean Delvare <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2017-03-02sched/headers: Prepare to remove <linux/cred.h> inclusion from <linux/sched.h>Ingo Molnar1-0/+1
Add #include <linux/cred.h> dependencies to all .c files rely on sched.h doing that for them. Note that even if the count where we need to add extra headers seems high, it's still a net win, because <linux/sched.h> is included in over 2,200 files ... Acked-by: Linus Torvalds <[email protected]> Cc: Mike Galbraith <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Signed-off-by: Ingo Molnar <[email protected]>
2016-02-07misc: eeprom: use kobj_to_dev()Geliang Tang1-1/+1
Use kobj_to_dev() instead of open-coding it. Signed-off-by: Geliang Tang <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-05misc: eeprom: clean up eeprom_read()Vladimir Zapolskiy1-5/+0
The change removes redundant sysfs binary file boundary check, since this task is already done on caller side in fs/sysfs/file.c Signed-off-by: Vladimir Zapolskiy <[email protected]> Reviewed-by: Jean Delvare <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-23EEPROM: Introduce the use of devm_kzallocHimangi Saraogi1-17/+6
This patch introduces the use of devm_kzalloc and does away with the kfrees in the probe and remove functions. Also, a label and the err variable are removed. The header device.h is included to make the devm_ function explicitly available and slab.h is done away with as it is no longer needed. Signed-off-by: Himangi Saraogi <[email protected]> Acked-by: Julia Lawall <[email protected]> Reviewed-by: Jean Delvare <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-02-07drivers/misc: delete non-required instances of include <linux/init.h>Paul Gortmaker1-1/+0
None of these files are actually using any __init type directives and hence don't need to include <linux/init.h>. Most are just a left over from __devinit and __cpuinit removal, or simply due to code getting copied from one driver to the next. Cc: Arnd Bergmann <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Signed-off-by: Paul Gortmaker <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-01-29Update Jean Delvare's e-mail addressJean Delvare1-1/+1
Signed-off-by: Jean Delvare <[email protected]>
2012-01-24MISC: convert drivers/misc/* to use module_i2c_driver()Axel Lin1-13/+1
This patch converts the drivers in drivers/misc/* to use the module_i2c_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin <[email protected]> Cc: Michael Hennerich <[email protected]> Cc: Anantha Narayanan <[email protected]> Cc: Hemanth V <[email protected]> Cc: Christoph Mair <[email protected]> Cc: Grant Likely <[email protected]> Cc: Ben Gardner <[email protected]> Cc: Minkyu Kang <[email protected]> Cc: Kalhan Trisal <[email protected]> Cc: Darrick J. Wong <[email protected]> Cc: Daniel Mack <[email protected]> Cc: Rodolfo Giometti <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-21sysfs: add struct file* to bin_attr callbacksChris Wright1-1/+2
This allows bin_attr->read,write,mmap callbacks to check file specific data (such as inode owner) as part of any privilege validation. Signed-off-by: Chris Wright <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-14EEPROM: Header file cleanupArce, Abraham1-20/+16
Change eeprom.c header file to format as in conventions Signed-off-by: Abraham Arce <[email protected]> Acked-by: Jean Delvare <[email protected]> Acked-by: Wolfram Sang <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2009-12-14i2c: Drop I2C_CLIENT_INSMOD_1Jean Delvare1-3/+0
This macro simply declares an enum, so drivers might as well declare it themselves. Signed-off-by: Jean Delvare <[email protected]> Tested-by: Wolfram Sang <[email protected]>
2009-12-14i2c: Get rid of struct i2c_client_address_dataJean Delvare1-1/+1
Struct i2c_client_address_data only contains one field at this point, which makes its usefulness questionable. Get rid of it and pass simple address lists around instead. Signed-off-by: Jean Delvare <[email protected]> Tested-by: Wolfram Sang <[email protected]>
2009-12-14i2c: Drop the kind parameter from detect callbacksJean Delvare1-2/+1
The "kind" parameter always has value -1, and nobody is using it any longer, so we can remove it. Signed-off-by: Jean Delvare <[email protected]> Tested-by: Wolfram Sang <[email protected]>
2009-01-26i2c: Move old eeprom driver to /drivers/misc/eepromWolfram Sang1-0/+257
Update Kconfig text to specify this driver as I2C. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Jean Delvare <[email protected]>