Re: [PATCH][OF] Add of_device_is_available function

2008-02-26 Thread Josh Boyer
On Tue, 26 Feb 2008 14:44:23 -0800 (PST) David Miller <[EMAIL PROTECTED]> wrote: > From: Benjamin Herrenschmidt <[EMAIL PROTECTED]> > Date: Wed, 27 Feb 2008 08:45:37 +1100 > > > I doubt we do that. Properties that contain things like ranges, or "reg" > > properties are expected to be of a size th

Re: [PATCH][OF] Add of_device_is_available function

2008-02-26 Thread Benjamin Herrenschmidt
On Tue, 2008-02-26 at 14:44 -0800, David Miller wrote: > From: Benjamin Herrenschmidt <[EMAIL PROTECTED]> > Date: Wed, 27 Feb 2008 08:45:37 +1100 > > > I doubt we do that. Properties that contain things like ranges, or "reg" > > properties are expected to be of a size that is a multiple of > > #s

Re: [PATCH][OF] Add of_device_is_available function

2008-02-26 Thread David Miller
From: Benjamin Herrenschmidt <[EMAIL PROTECTED]> Date: Wed, 27 Feb 2008 08:45:37 +1100 > I doubt we do that. Properties that contain things like ranges, or "reg" > properties are expected to be of a size that is a multiple of > #size-cells/#address-cells and I'm not sure that won't break things he

Re: [PATCH][OF] Add of_device_is_available function

2008-02-26 Thread Benjamin Herrenschmidt
On Tue, 2008-02-26 at 13:34 -0800, David Miller wrote: > From: Paul Mackerras <[EMAIL PROTECTED]> > Date: Tue, 26 Feb 2008 20:04:12 +1100 > > > It would probably be good to defend against the possibility that the > > property isn't null-terminated (for example if its length is zero). > > FWIW, w

Re: [PATCH][OF] Add of_device_is_available function

2008-02-26 Thread David Miller
From: Paul Mackerras <[EMAIL PROTECTED]> Date: Tue, 26 Feb 2008 20:04:12 +1100 > It would probably be good to defend against the possibility that the > property isn't null-terminated (for example if its length is zero). FWIW, when I pull in the device tree on sparc I eliminate any need for those

Re: [PATCH][OF] Add of_device_is_available function

2008-02-26 Thread Paul Mackerras
Josh Boyer writes: > + status = of_get_property(device, "status", NULL); > + if (status == NULL) > + return 1; > + > + if (!strcmp(status, "okay") || !strcmp(status, "ok")) It would probably be good to defend against the possibility that the property isn't null-terminated

[PATCH][OF] Add of_device_is_available function

2008-02-23 Thread Josh Boyer
On Sat, 23 Feb 2008 18:59:04 -0600 Josh Boyer <[EMAIL PROTECTED]> wrote: > On Sat, 23 Feb 2008 15:58:23 -0600 > Josh Boyer <[EMAIL PROTECTED]> wrote: > > > IEEE 1275 defined a standard "status" property to indicate the operational > > status of a device. The property has four possible values: ok