History log of /linux/drivers/sbus/char/bbc_i2c.c (Results 1 – 25 of 31)
Revision Date Author Comments
# d0e71777 04-Mar-2024 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

sbus: bbc_i2c: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error

sbus: bbc_i2c: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.

To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new(), which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andreas Larsson <andreas@gaisler.com>
Signed-off-by: Andreas Larsson <andreas@gaisler.com>
Link: https://lore.kernel.org/r/a5ba9d930451d1eeabc4208cc6c75184a92a248d.1709591118.git.u.kleine-koenig@pengutronix.de

show more ...


# 61fc8d40 04-Mar-2024 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

sbus: Add prototype for bbc_envctrl_init and bbc_envctrl_cleanup to header

This fixes the following build warning:

drivers/sbus/char/bbc_envctrl.c:566:5: error: no previous prototype for ‘bbc_envc

sbus: Add prototype for bbc_envctrl_init and bbc_envctrl_cleanup to header

This fixes the following build warning:

drivers/sbus/char/bbc_envctrl.c:566:5: error: no previous prototype for ‘bbc_envctrl_init’ [-Werror=missing-prototypes]
566 | int bbc_envctrl_init(struct bbc_i2c_bus *bp)
| ^~~~~~~~~~~~~~~~
drivers/sbus/char/bbc_envctrl.c:594:6: error: no previous prototype for ‘bbc_envctrl_cleanup’ [-Werror=missing-prototypes]
594 | void bbc_envctrl_cleanup(struct bbc_i2c_bus *bp)
| ^~~~~~~~~~~~~~~~~~~

which in the presence of -Werror=missing-prototypes yields a compiler
error.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andreas Larsson <andreas@gaisler.com>
Signed-off-by: Andreas Larsson <andreas@gaisler.com>
Link: https://lore.kernel.org/r/57bc3b43b405431a486162fb8c2558072e976747.1709591118.git.u.kleine-koenig@pengutronix.de

show more ...


# 878f2774 14-Jul-2023 Rob Herring <robh@kernel.org>

sbus: Explicitly include correct DT includes

The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it was merged into the regular platform bus.
As part of that m

sbus: Explicitly include correct DT includes

The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it was merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.

Acked-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://lore.kernel.org/r/20230714175048.4066006-1-robh@kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>

show more ...


# 09c434b8 19-May-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Add SPDX license identifier for more missed files

Add SPDX license identifiers to all files which:

- Have no license information of any form

- Have MODULE_LICENCE("GPL*") inside which

treewide: Add SPDX license identifier for more missed files

Add SPDX license identifiers to all files which:

- Have no license information of any form

- Have MODULE_LICENCE("GPL*") inside which was used in the initial
scan/conversion to ignore the file

These files fall under the project license, GPL v2 only. The resulting SPDX
license identifier is:

GPL-2.0-only

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

show more ...


# 7cafb31c 20-Oct-2014 Wolfram Sang <wsa@the-dreams.de>

sbus: char: drop owner assignment from platform_drivers

A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>


# 5cdceab3 03-Aug-2014 Christopher Alexander Tobias Schulze <cat.schulze@alice-dsl.net>

bbc-i2c: Fix BBC I2C envctrl on SunBlade 2000

Fix regression in bbc i2c temperature and fan control on some Sun systems
that causes the driver to refuse to load due to the bbc_i2c_bussel resource no

bbc-i2c: Fix BBC I2C envctrl on SunBlade 2000

Fix regression in bbc i2c temperature and fan control on some Sun systems
that causes the driver to refuse to load due to the bbc_i2c_bussel resource not
being present on the (second) i2c bus where the temperature sensors and fan
control are located. (The check for the number of resources was removed when
the driver was ported to a pure OF driver in mid 2008.)

Signed-off-by: Christopher Alexander Tobias Schulze <cat.schulze@alice-dsl.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

show more ...


# 8b2abcbc 06-Jan-2014 Paul Gortmaker <paul.gortmaker@windriver.com>

sparc: delete non-required instances of include <linux/init.h>

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

sparc: delete non-required instances of include <linux/init.h>

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.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

show more ...


# 6e51f857 30-Mar-2013 Sam Ravnborg <sam@ravnborg.org>

bbc_i2c: fix section mismatch warning

Fix following warning:

WARNING: drivers/sbus/char/bbc.o(.text+0x674): Section mismatch in reference from the function bbc_i2c_probe() to the function .init.tex

bbc_i2c: fix section mismatch warning

Fix following warning:

WARNING: drivers/sbus/char/bbc.o(.text+0x674): Section mismatch in reference from the function bbc_i2c_probe() to the function .init.text:T.463()
The function bbc_i2c_probe() references the function __init T.463().
This is often because bbc_i2c_probe lacks a __init
annotation or the annotation of T.463 is wrong.

bbc_i2c_probe() referenced the inlined attach_one_i2c().
As probe may be called after init drop __init annotations
on all functions used by bbc_i2c_probe()

The warning was seen with a sparc64 defconfig build

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

show more ...


# 082a2004 21-Dec-2012 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Drivers: sbus: remove __dev* attributes.

CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
markings need to be removed.

This change removes the use of __devinit, __devexit_p, and

Drivers: sbus: remove __dev* attributes.

CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
markings need to be removed.

This change removes the use of __devinit, __devexit_p, and __devexit
from these drivers.

Based on patches originally written by Bill Pemberton, but redone by me
in order to handle some of the coding style issues better, by hand.

Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Peter Senna Tschudin <peter.senna@gmail.com>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

show more ...


# dbf2b92d 26-Nov-2011 Axel Lin <axel.lin@gmail.com>

sbus: convert drivers/sbus/char/* to use module_platform_driver()

This patch converts the drivers in drivers/sbus/char/* to use the
module_platform_driver() macro which makes the code smaller and a

sbus: convert drivers/sbus/char/* to use module_platform_driver()

This patch converts the drivers in drivers/sbus/char/* to use the
module_platform_driver() macro which makes the code smaller and a bit
simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

show more ...


# e4104710 21-Nov-2011 Axel Lin <axel.lin@gmail.com>

bbc_i2c: Remove unneeded err variable

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 4ebb24f7 23-Feb-2011 Grant Likely <grant.likely@secretlab.ca>

dt/sparc: Eliminate users of of_platform_{,un}register_driver

Get rid of old users of of_platform_driver in arch/sparc. Most
of_platform_driver users can be converted to use the platform_bus
direct

dt/sparc: Eliminate users of of_platform_{,un}register_driver

Get rid of old users of of_platform_driver in arch/sparc. Most
of_platform_driver users can be converted to use the platform_bus
directly.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>

show more ...


# 2dc11581 06-Aug-2010 Grant Likely <grant.likely@secretlab.ca>

of/device: Replace struct of_device with struct platform_device

of_device is just an alias for platform_device, so remove it entirely. Also
replace to_of_device() with to_platform_device() and upda

of/device: Replace struct of_device with struct platform_device

of_device is just an alias for platform_device, so remove it entirely. Also
replace to_of_device() with to_platform_device() and update comment blocks.

This patch was initially generated from the following semantic patch, and then
edited by hand to pick up the bits that coccinelle didn't catch.

@@
@@
-struct of_device
+struct platform_device

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Reviewed-by: David S. Miller <davem@davemloft.net>

show more ...


# 1ab1d63a 24-Jun-2010 Grant Likely <grant.likely@secretlab.ca>

of/platform: remove all of_bus_type and of_platform_bus_type references

Both of_bus_type and of_platform_bus_type are just #define aliases
for the platform bus. This patch removes all references to

of/platform: remove all of_bus_type and of_platform_bus_type references

Both of_bus_type and of_platform_bus_type are just #define aliases
for the platform bus. This patch removes all references to them and
switches to the of_register_platform_driver()/of_unregister_platform_driver()
API for registering.

Subsequent patches will convert each user of of_register_platform_driver()
into plain platform_drivers without the of_platform_driver shim. At which
point the of_register_platform_driver()/of_unregister_platform_driver()
functions can be removed.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: David S. Miller <davem@davemloft.net>

show more ...


# 1636f8ac 18-Jun-2010 Grant Likely <grant.likely@secretlab.ca>

sparc/of: Move of_device fields into struct pdev_archdata

This patch moves SPARC architecture specific data members out of
struct of_device and into the pdev_archdata structure. The reason
for this

sparc/of: Move of_device fields into struct pdev_archdata

This patch moves SPARC architecture specific data members out of
struct of_device and into the pdev_archdata structure. The reason
for this change is to unify the struct of_device definition amongst
all the architectures. It also remvoes the .sysdata, .slot, .portid
and .clock_freq properties because they aren't actually used by
anything.

A subsequent patch will replace struct of_device entirely with struct
platform_device and the of_platform support code will share common
routines with the platform bus (but the bus instances themselves can
remain separate).

This patch also adds 'struct resources *resource' and num_resources
to match the fields defined in struct platform_device. After this
change, 'struct platform_device' can be used as a drop-in replacement
for 'struct of_platform'.

This change is in preparation for merging the of_platform_bus_type
with the platform_bus_type.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: David S. Miller <davem@davemloft.net>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>

show more ...


# 4018294b 13-Apr-2010 Grant Likely <grant.likely@secretlab.ca>

of: Remove duplicate fields from of_platform_driver

.name, .match_table and .owner are duplicated in both of_platform_driver
and device_driver. This patch is a removes the extra copies from struct

of: Remove duplicate fields from of_platform_driver

.name, .match_table and .owner are duplicated in both of_platform_driver
and device_driver. This patch is a removes the extra copies from struct
of_platform_driver and converts all users to the device_driver members.

This patch is a pretty mechanical change. The usage model doesn't change
and if any drivers have been missed, or if anything has been fixed up
incorrectly, then it will fail with a compile time error, and the fixup
will be trivial. This patch looks big and scary because it touches so
many files, but it should be pretty safe.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Sean MacLennan <smaclennan@pikatech.com>

show more ...


# 61c7a080 13-Apr-2010 Grant Likely <grant.likely@secretlab.ca>

of: Always use 'struct device.of_node' to get device node pointer.

The following structure elements duplicate the information in
'struct device.of_node' and so are being eliminated. This patch
make

of: Always use 'struct device.of_node' to get device node pointer.

The following structure elements duplicate the information in
'struct device.of_node' and so are being eliminated. This patch
makes all readers of these elements use device.of_node instead.

(struct of_device *)->node
(struct dev_archdata *)->prom_node (sparc)
(struct dev_archdata *)->of_node (powerpc & microblaze)

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>

show more ...


# f4c13638 04-Mar-2009 Roel Kluin <roel.kluin@gmail.com>

sparc64: wait_event_interruptible_timeout may return -ERESTARTSYS

wait_event_interruptible_timeout may return -ERESTARTSYS.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S.

sparc64: wait_event_interruptible_timeout may return -ERESTARTSYS

wait_event_interruptible_timeout may return -ERESTARTSYS.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

show more ...


# 33b07db9 01-Dec-2008 Linus Torvalds <torvalds@linux-foundation.org>

Revert "of_platform_driver noise on sparce"

This reverts commit e669dae6141ff97d3c7566207f5de3b487dcf837, since it
is incomplete, and clashes with fuller patches and the sparc 32/64
unification effo

Revert "of_platform_driver noise on sparce"

This reverts commit e669dae6141ff97d3c7566207f5de3b487dcf837, since it
is incomplete, and clashes with fuller patches and the sparc 32/64
unification effort.

Requested-by: David Miller <davem@davemloft.net>
Acked-by: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

show more ...


# e669dae6 22-Nov-2008 Al Viro <viro@ftp.linux.org.uk>

of_platform_driver noise on sparce

switch to __init for those; unlike powerpc sparc has no hotplug support
for that stuff and their ->probe() tends to call __init functions while
being declared __de

of_platform_driver noise on sparce

switch to __init for those; unlike powerpc sparc has no hotplug support
for that stuff and their ->probe() tends to call __init functions while
being declared __devinit.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

show more ...


# fd098316 31-Aug-2008 David S. Miller <davem@davemloft.net>

sparc: Annotate of_device_id arrays with const or __initdata.

As suggested by Stephen Rothwell.

Signed-off-by: David S. Miller <davem@davemloft.net>


# e21e245b 30-Aug-2008 David S. Miller <davem@davemloft.net>

bbc_i2c: Convert to pure OF driver.

This thing was a mess, who wrote this junk? :)

Luckily we'll soon have nice generic I2C layer drivers for this PCF
based I2C stuff on sparc64.

Signed-off-by: Da

bbc_i2c: Convert to pure OF driver.

This thing was a mess, who wrote this junk? :)

Luckily we'll soon have nice generic I2C layer drivers for this PCF
based I2C stuff on sparc64.

Signed-off-by: David S. Miller <davem@davemloft.net>

show more ...


# 50aa485e 31-Jul-2007 Mariusz Kozlowski <m.kozlowski@tuxland.pl>

[BBC_I2C]: kmalloc + memset conversion to kzalloc

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>


# dd00cc48 19-Jul-2007 Yoann Padioleau <padator@wanadoo.fr>

some kmalloc/memset ->kzalloc (tree wide)

Transform some calls to kmalloc/memset to a single kzalloc (or kcalloc).

Here is a short excerpt of the semantic patch performing
this transformation:

@@

some kmalloc/memset ->kzalloc (tree wide)

Transform some calls to kmalloc/memset to a single kzalloc (or kcalloc).

Here is a short excerpt of the semantic patch performing
this transformation:

@@
type T2;
expression x;
identifier f,fld;
expression E;
expression E1,E2;
expression e1,e2,e3,y;
statement S;
@@

x =
- kmalloc
+ kzalloc
(E1,E2)
... when != \(x->fld=E;\|y=f(...,x,...);\|f(...,x,...);\|x=E;\|while(...) S\|for(e1;e2;e3) S\)
- memset((T2)x,0,E1);

@@
expression E1,E2,E3;
@@

- kzalloc(E1 * E2,E3)
+ kcalloc(E1,E2,E3)

[akpm@linux-foundation.org: get kcalloc args the right way around]
Signed-off-by: Yoann Padioleau <padator@wanadoo.fr>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Acked-by: Russell King <rmk@arm.linux.org.uk>
Cc: Bryan Wu <bryan.wu@analog.com>
Acked-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Dave Airlie <airlied@linux.ie>
Acked-by: Roland Dreier <rolandd@cisco.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Acked-by: Pierre Ossman <drzeus-list@drzeus.cx>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: "David S. Miller" <davem@davemloft.net>
Acked-by: Greg KH <greg@kroah.com>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

show more ...


# 4b5dff76 14-May-2007 David S. Miller <davem@sunset.davemloft.net>

[SPARC] SBUS: bbc_i2c.c needs asm/io.h

Signed-off-by: David S. Miller <davem@davemloft.net>


12