aboutsummaryrefslogtreecommitdiff
path: root/drivers/misc/eeprom/max6875.c
AgeCommit message (Collapse)AuthorFilesLines
2019-07-25misc: eeprom: max6875: convert to i2c_new_dummy_deviceWolfram Sang1-3/+3
Move from i2c_new_dummy() to i2c_new_dummy_device(), so we now get an ERRPTR which we use in error handling. Signed-off-by: Wolfram Sang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-06-05treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441Thomas Gleixner1-4/+1
Based on 1 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 version 2 of the license extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 315 file(s). Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Allison Randal <[email protected]> Reviewed-by: Armijn Hemel <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-08-05misc: eeprom: assignment outside the if statementParth Y Shah1-1/+2
Assignment of any variable should be kept outside the if statement Signed-off-by: Parth Y Shah <[email protected]> Reviewed-by: Jean Delvare <[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]>
2015-09-08Merge branch 'i2c/for-4.3' of ↵Linus Torvalds1-0/+1
git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c updates from Wolfram Sang: "Features: - new drivers: Renesas EMEV2, register based MUX, NXP LPC2xxx - core: scans DT and assigns wakeup interrupts. no driver changes needed. - core: some refcouting issues fixed and better API for that - core: new helper function for best effort block read emulation - slave framework: proper DT bindings and userspace instantiation - some bigger work for xiic, pxa, omap drivers .. and quite a number of smaller driver fixes, cleanups, improvements" * 'i2c/for-4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (65 commits) i2c: mux: reg Change ioread endianness for readback i2c: mux: reg: fix compilation warnings i2c: mux: reg: simplify register size checking i2c: muxes: fix leaked i2c adapter device node references i2c: allow specifying separate wakeup interrupt in device tree of/irq: export of_get_irq_byname() i2c: xgene-slimpro: dma_mapping_error() doesn't return an error code i2c: Replace I2C_CROS_EC_TUNNEL dependency eeprom: at24: use i2c_smbus_read_i2c_block_data_or_emulated i2c: core: Add support for best effort block read emulation i2c: lpc2k: add driver i2c: mux: Add register-based mux i2c-mux-reg i2c: dt: describe generic bindings i2c: slave: print warning if slave flag not set i2c: support 10 bit and slave addresses in sysfs 'new_device' i2c: take address space into account when checking for used addresses i2c: apply DT flags when probing i2c: make address check indpendent from client struct i2c: rename address check functions i2c: apply address offset for slaves, too ...
2015-08-10misc: eeprom: Export I2C module alias information in missing driversJavier Martinez Canillas1-0/+1
The I2C core always reports the MODALIAS uevent as "i2c:<client name>" regardless if the driver later is match using the I2C id_table or the of_match_table. So the driver needs to export the I2C table and this be built into the module or udev won't have the necessary information to auto load the correct module when the device is added. Signed-off-by: Javier Martinez Canillas <[email protected]> Reviewed-by: Jean Delvare <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2015-08-05misc: eeprom: max6875: clean up max6875_read()Vladimir Zapolskiy1-6/+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]> 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]>
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/+1
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: max6875: Header file cleanupArce, Abraham1-26/+26
Change max6875.c header file to format as in conventions Signed-off-by: Abraham Arce <[email protected]> Acked-by: Wolfram Sang <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2009-10-04max6875: Discard obsolete detect methodJean Delvare1-24/+5
There is no point in implementing a detect callback for the MAX6875, as this device can't be detected. It was there solely to handle "force" module parameters to instantiate devices, but now we have a better sysfs interface that can do the same. So we can get rid of the ugly module parameters and the detect callback. This basically divides the binary module size by 2. Signed-off-by: Jean Delvare <[email protected]> Acked-by: Wolfram Sang <[email protected]> Acked-by: Ben Gardner <[email protected]>
2009-06-15i2c/chips: Move max6875 to drivers/misc/eepromWolfram Sang1-0/+246
This driver only reads the user EEPROM of that chip, so we can move it to the eeprom-directory in order to further clean up (and later remove) drivers/i2c/chips. The Kconfig text was updated to match the current functionality, dropping the meanwhile obsoleted parts. Defconfigs have been adapted. Signed-off-by: Wolfram Sang <[email protected]> Acked-by: Ben Gardner <[email protected]> Signed-off-by: Jean Delvare <[email protected]>