Re: [PATCH] tty: serial: ip22zilog: Use platform device for probing

From: Thomas Bogendoerfer
Date: Wed Jul 23 2025 - 08:32:41 EST


On Wed, Jul 23, 2025 at 02:02:43PM +0200, Greg Kroah-Hartman wrote:
> On Wed, Jul 23, 2025 at 01:58:23PM +0200, Thomas Bogendoerfer wrote:
> > +static int __init sgi_zilog_devinit(void)
> > +{
> > + struct resource res;
> > +
> > + memset(&res, 0, sizeof(res));
> > + res.start = HPC3_CHIP0_BASE + offsetof(struct hpc3_regs, rtcregs);
> > + res.end = res.start + sizeof(hpc3c0->rtcregs) - 1;
> > + res.flags = IORESOURCE_MEM;
> > +
> > + return platform_device_register(&zilog_device);
>
> Odd function, why do you need "res" at all if you do not do anything
> with it?

ouch, leftover from copy&paste... will remove in v2

Thomas.

--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]