Re: [PATCH 2/3] N810: Don't export camera orientation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 15, 2008 at 08:54:34AM +0200, andrzej zaborowski wrote:
> On 15/05/2008, Felipe Balbi <me@xxxxxxxxxxxxxxx> wrote:
> > On Wed, May 14, 2008 at 03:04:37PM +0300, Sakari Ailus wrote:
> >  > ext Felipe Balbi wrote:
> >  >
> >  > Hello Felipe, and thanks for reviewing the patch! :)
> >  >
> >  >> On Tue, 13 May 2008 19:04:22 +0300, Sakari Ailus <sakari.ailus@xxxxxxxxx>
> >  >> wrote:
> >  >>> @@ -298,12 +340,21 @@ static int tcm825x_ifparm(struct v4l2_ifparm *p)
> >  >>>     return 0;
> >  >>>  }
> >  >>>
> >  >>> +static int tcm825x_is_upside_down(void)
> >  >>> +{
> >  >>> +   if (machine_is_nokia_n810())
> >  >>> +           return 1;
> >  >>> +
> >  >>> +   return 0;
> >  >>> +}
> >  >>> +
> >  >>>  const struct tcm825x_platform_data n800_tcm825x_platform_data = {
> >  >>> -   .is_okay      = tcm825x_is_okay,
> >  >>> -   .power_set    = tcm825x_power_set,
> >  >>> -   .default_regs = tcm825x_default_regs,
> >  >>> -   .needs_reset  = tcm825x_needs_reset,
> >  >>> -   .ifparm       = tcm825x_ifparm,
> >  >>> +   .is_okay        = tcm825x_is_okay,
> >  >>> +   .power_set      = tcm825x_power_set,
> >  >>> +   .default_regs   = tcm825x_default_regs,
> >  >>> +   .needs_reset    = tcm825x_needs_reset,
> >  >>> +   .ifparm         = tcm825x_ifparm,
> >  >>> +   .is_upside_down = tcm825x_is_upside_down,
> >  >>
> >  >> ok, now i got your point but this could be:
> >  >> .is_upside_down = machine_is_nokia_n810() ? 1 : 0,
> >  >
> >  > This doesn't work because machine_is_nokia_n810() is not constant.
> >  >
> >  > Anyway, tcm825x_is_upside_down can be made more simple as it could just
> >  > return machine_is_nokia_n810().
> >  >
> >  > I'll send new patches.
> >
> >  Didn't quite get, machine_is_nokia_n810() will always be true when
> >  running in n810. Could you clarify a bit :-p
> 
> It'll *return* true, but C initialisers must be constants.  It simply
> wouldn't compile.

and that's why i was using ?:

machine_is_nokia_n810 ? 1 : 0

the same as:

if (machine_is_nokia_n810)
	return 1;
else
	return 0;

> 
> Cheers
> -- 
> Please do not print this email unless absolutely necessary. Spread
> environmental awareness.

-- 
Best Regards,

Felipe Balbi
me@xxxxxxxxxxxxxxx
http://blog.felipebalbi.com
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux