Re: [PATCH] DS1286: new RTC driver

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

 



On Thu, 7 Aug 2008, Alessandro Zummo wrote:
> On Sun,  3 Aug 2008 19:41:37 +0200 (CEST)
> Thomas Bogendoerfer <tsbogend@xxxxxxxxxxxxxxxx> wrote:
> > +static int __devinit ds1286_probe(struct platform_device *pdev)
> > +{
> > +	struct rtc_device *rtc;
> > +	struct resource *res;
> > +	struct ds1286_priv *priv;
> > +	int ret = 0;
> > +
> > +	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> > +	if (!res)
> > +		return -ENODEV;
> > +	priv = kzalloc(sizeof *priv, GFP_KERNEL);
> 
>  sizeof(struct ds1286_priv) is a little bit cleaner.

What if the type of priv changes?

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux