* [PATCH 1/2 v2] sysdev,mv64x60: I2C defaults
@ 2008-04-21 17:36 Remi Machet
2008-04-21 17:55 ` Dale Farnsworth
0 siblings, 1 reply; 2+ messages in thread
From: Remi Machet @ 2008-04-21 17:36 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
I2C parameters freq_m and freq_n are assigned default in the code
but if those properties are not found in the open firmware description
the init returns an error => the code now uses the default
values if the properties are not found.
Signed-off-by: Remi Machet (rmachet@slac.stanford.edu)
---
This is the first part of the re-submission of my patch of 4/17/2008
titled "[PATCH] sysdev,mv64x60: initialization of mv64x60 ethernet,
serial and I2C"
--- a/arch/powerpc/sysdev/mv64x60_dev.c
+++ b/arch/powerpc/sysdev/mv64x60_dev.c
@@ -338,15 +338,13 @@ static int __init mv64x60_i2c_device_setup(struct device_node *np, int id)
pdata.freq_m = 8; /* default */
prop = of_get_property(np, "freq_m", NULL);
- if (!prop)
- return -ENODEV;
- pdata.freq_m = *prop;
+ if (prop)
+ pdata.freq_m = *prop;
pdata.freq_m = 3; /* default */
prop = of_get_property(np, "freq_n", NULL);
- if (!prop)
- return -ENODEV;
- pdata.freq_n = *prop;
+ if (prop)
+ pdata.freq_n = *prop;
pdata.timeout = 1000; /* default: 1 second */
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 1/2 v2] sysdev,mv64x60: I2C defaults
2008-04-21 17:36 [PATCH 1/2 v2] sysdev,mv64x60: I2C defaults Remi Machet
@ 2008-04-21 17:55 ` Dale Farnsworth
0 siblings, 0 replies; 2+ messages in thread
From: Dale Farnsworth @ 2008-04-21 17:55 UTC (permalink / raw)
To: Remi Machet; +Cc: linuxppc-dev, Paul Mackerras
On Mon, Apr 21, 2008 at 10:36:48AM -0700, Remi Machet wrote:
> I2C parameters freq_m and freq_n are assigned default in the code
> but if those properties are not found in the open firmware description
> the init returns an error => the code now uses the default
> values if the properties are not found.
>
> Signed-off-by: Remi Machet (rmachet@slac.stanford.edu)
Acked-by: Dale Farnsworth <dale@farnsworth.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-04-21 17:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-21 17:36 [PATCH 1/2 v2] sysdev,mv64x60: I2C defaults Remi Machet
2008-04-21 17:55 ` Dale Farnsworth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).