From: Takashi Iwai Subject: Re: [PATCH 001b/001] snd-powermac: older kernel compatibility Date: Thu, 17 Apr 2008 11:46:10 +0200 Message-ID: References: <46e1c7760804160953x66dd5e6amd1627957060f8169@mail.gmail.com> <46e1c7760804170010i69be78e6o4820ec6d95e35fb8@mail.gmail.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id EAA7810384E for ; Thu, 17 Apr 2008 11:46:10 +0200 (CEST) In-Reply-To: <46e1c7760804170010i69be78e6o4820ec6d95e35fb8@mail.gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Risto Suominen Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Thu, 17 Apr 2008 10:10:06 +0300, Risto Suominen wrote: > > 2008/4/16, Takashi Iwai : > > > > OK, applied both patches to alsa-driver HG tree. > > Thanks. > > But it looks like the hunk below was not accepted. Is this because > it's in alsa-kernel? Yes, alsa-kernel/* is independent from alsa-driver tree. > And it uses LINUX_VERSION_CODE? Anyway, these > seem to be needed by others than snd-powermac, too. Maybe they would > belong to include directory, maybe another compat.h file. I must > confess that I'm not sure about the exact kernel versions where the > names were changed. The hack isn't definitely for the latest upstream, so if this is needed, rather define in each *.c in alsa-driver/ppc please. thanks, Takashi > --- alsa-kernel/ppc/pmac.h.orig 2008-02-05 11:23:24.000000000 +0200 > +++ alsa-kernel/ppc/pmac.h 2008-03-31 23:45:36.000000000 +0300 > @@ -207,4 +207,11 @@ > > int snd_pmac_add_automute(struct snd_pmac *chip); > > +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 16) > +#define of_device_is_compatible(dev, s) device_is_compatible(dev, s) > +#define input_get_drvdata(dev) (dev->private) > +#define i2c_smbus_write_i2c_block_data(client, cmd, len, vals) \ > + i2c_smbus_write_block_data(client, cmd, len, vals) > +#endif > + > #endif /* __PMAC_H */ >