From: Takashi Iwai <tiwai@suse.de>
To: Adrian Bunk <bunk@stusta.de>
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: 2.6.15-rc5-mm1: git-alsa-vs-git-pcmcia.patch introduces new compile errors
Date: Mon, 05 Dec 2005 21:05:27 +0100 [thread overview]
Message-ID: <s5hwtijl37c.wl%tiwai@suse.de> (raw)
In-Reply-To: <20051205190632.GK9973@stusta.de>
At Mon, 5 Dec 2005 20:06:32 +0100,
Adrian Bunk wrote:
>
> On Sun, Dec 04, 2005 at 11:21:53PM -0800, Andrew Morton wrote:
> >...
> > Subsystem trees
> >...
> > +git-alsa-vs-git-pcmcia.patch
> >
> > Try to fix clash between two subsystem trees
> >...
>
> git-alsa.patch completely removes pdacf_t, and this patch adds a user
> resulting in the following compile error:
(snip)
> git-alsa.patch removes some more code git-alsa-vs-git-pcmcia.patch adds
> users for:
(snip)
> cu
> Adrian
My bad, the below is the fixed patch.
Andrew, could you replace with this one?
thanks,
Takashi
---
--- linux-2.6.15-rc5/sound/pcmcia/vx/vxpocket.c-dist 2005-12-05 20:57:55.000000000 +0100
+++ linux-2.6.15-rc5/sound/pcmcia/vx/vxpocket.c 2005-12-05 21:01:28.000000000 +0100
@@ -133,11 +133,9 @@ static struct snd_vx_hardware vxp440_hw
*/
static struct snd_vxpocket *snd_vxpocket_new(struct snd_card *card, int ibl)
{
- client_reg_t client_reg; /* Register with cardmgr */
dev_link_t *link; /* Info for cardmgr */
struct vx_core *chip;
struct snd_vxpocket *vxp;
- int ret;
static struct snd_device_ops ops = {
.dev_free = snd_vxpocket_dev_free,
};
@@ -286,67 +284,55 @@ failed:
kfree(parse);
}
+#ifdef CONFIG_PM
-/*
- * event callback
- */
-static int vxpocket_event(event_t event, int priority, event_callback_args_t *args)
+static int vxp_suspend(struct pcmcia_device *dev)
{
- dev_link_t *link = args->client_data;
+ dev_link_t *link = dev_to_instance(dev);
struct vx_core *chip = link->priv;
- switch (event) {
- case CS_EVENT_CARD_REMOVAL:
- snd_printdd(KERN_DEBUG "CARD_REMOVAL..\n");
- link->state &= ~DEV_PRESENT;
- if (link->state & DEV_CONFIG)
- chip->chip_status |= VX_STAT_IS_STALE;
- break;
- case CS_EVENT_CARD_INSERTION:
- snd_printdd(KERN_DEBUG "CARD_INSERTION..\n");
- link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
- vxpocket_config(link);
- break;
-#ifdef CONFIG_PM
- case CS_EVENT_PM_SUSPEND:
- snd_printdd(KERN_DEBUG "SUSPEND\n");
- link->state |= DEV_SUSPEND;
+ snd_printdd(KERN_DEBUG "SUSPEND\n");
+ link->state |= DEV_SUSPEND;
+ if (chip) {
+ snd_printdd(KERN_DEBUG "snd_vx_suspend calling\n");
+ snd_vx_suspend(chip, PMSG_SUSPEND);
+ }
+ snd_printdd(KERN_DEBUG "RESET_PHYSICAL\n");
+ if (link->state & DEV_CONFIG)
+ pcmcia_release_configuration(link->handle);
+
+ return 0;
+}
+
+static int vxp_resume(struct pcmcia_device *dev)
+{
+ dev_link_t *link = dev_to_instance(dev);
+ struct vx_core *chip = link->priv;
+
+ snd_printdd(KERN_DEBUG "RESUME\n");
+ link->state &= ~DEV_SUSPEND;
+
+ snd_printdd(KERN_DEBUG "CARD_RESET\n");
+ if (DEV_OK(link)) {
+ //struct snd_vxpocket *vxp = (struct snd_vxpocket *)chip;
+ snd_printdd(KERN_DEBUG "requestconfig...\n");
+ pcmcia_request_configuration(link->handle, &link->conf);
if (chip) {
- snd_printdd(KERN_DEBUG "snd_vx_suspend calling\n");
- snd_vx_suspend(chip, PMSG_SUSPEND);
- }
- /* Fall through... */
- case CS_EVENT_RESET_PHYSICAL:
- snd_printdd(KERN_DEBUG "RESET_PHYSICAL\n");
- if (link->state & DEV_CONFIG)
- pcmcia_release_configuration(link->handle);
- break;
- case CS_EVENT_PM_RESUME:
- snd_printdd(KERN_DEBUG "RESUME\n");
- link->state &= ~DEV_SUSPEND;
- /* Fall through... */
- case CS_EVENT_CARD_RESET:
- snd_printdd(KERN_DEBUG "CARD_RESET\n");
- if (DEV_OK(link)) {
- //struct snd_vxpocket *vxp = (struct snd_vxpocket *)chip;
- snd_printdd(KERN_DEBUG "requestconfig...\n");
- pcmcia_request_configuration(link->handle, &link->conf);
- if (chip) {
- snd_printdd(KERN_DEBUG "calling snd_vx_resume\n");
- snd_vx_resume(chip);
- }
+ snd_printdd(KERN_DEBUG "calling snd_vx_resume\n");
+ snd_vx_resume(chip);
}
- snd_printdd(KERN_DEBUG "resume done!\n");
- break;
-#endif
}
+ snd_printdd(KERN_DEBUG "resume done!\n");
+
return 0;
}
+#endif
+
/*
*/
-static dev_link_t *vxpocket_attach(void)
+static int vxpocket_attach(struct pcmcia_device *p_dev)
{
struct snd_card *card;
struct snd_vxpocket *vxp;
@@ -359,22 +345,22 @@ static dev_link_t *vxpocket_attach(void)
}
if (i >= SNDRV_CARDS) {
snd_printk(KERN_ERR "vxpocket: too many cards found\n");
- return NULL;
+ return -EINVAL;
}
if (! enable[i])
- return NULL; /* disabled explicitly */
+ return -ENODEV; /* disabled explicitly */
/* ok, create a card instance */
card = snd_card_new(index[i], id[i], THIS_MODULE, 0);
if (card == NULL) {
snd_printk(KERN_ERR "vxpocket: cannot create a card instance\n");
- return NULL;
+ return -ENOMEM;
}
vxp = snd_vxpocket_new(card, ibl[i]);
if (! vxp) {
snd_card_free(card);
- return NULL;
+ return -ENODEV;
}
card->private_data = vxp;
@@ -382,17 +368,21 @@ static dev_link_t *vxpocket_attach(void)
card_alloc |= 1 << i;
/* Chain drivers */
- vxp->link.next = dev_list;
- dev_list = &vxp->link;
+ vxp->link.next = NULL;
- return &vxp->link;
+ vxp->link.handle = p_dev;
+ vxp->link.state |= DEV_PRESENT | DEV_CONFIG_PENDING;
+ p_dev->instance = &vxp->link;
+ vxpocket_config(&vxp->link);
+
+ return 0;
}
-static void vxpocket_detach(dev_link_t *link)
+static void vxpocket_detach(struct pcmcia_device *p_dev)
{
+ dev_link_t *link = dev_to_instance(p_dev);
struct snd_vxpocket *vxp;
struct vx_core *chip;
- dev_link_t **linkp;
if (! link)
return;
--- linux-2.6.15-rc5/sound/pcmcia/pdaudiocf/pdaudiocf.c-dist 2005-12-05 20:57:51.000000000 +0100
+++ linux-2.6.15-rc5/sound/pcmcia/pdaudiocf/pdaudiocf.c 2005-12-05 21:01:16.000000000 +0100
@@ -52,16 +52,13 @@ MODULE_PARM_DESC(enable, "Enable " CARD_
/*
*/
-static dev_info_t dev_info = "snd-pdaudiocf";
static struct snd_card *card_list[SNDRV_CARDS];
-static dev_link_t *dev_list;
/*
* prototypes
*/
static void pdacf_config(dev_link_t *link);
-static int pdacf_event(event_t event, int priority, event_callback_args_t *args);
-static void snd_pdacf_detach(dev_link_t *link);
+static void snd_pdacf_detach(struct pcmcia_device *p_dev);
static void pdacf_release(dev_link_t *link)
{
@@ -99,11 +96,10 @@ static int snd_pdacf_dev_free(struct snd
/*
* snd_pdacf_attach - attach callback for cs
*/
-static dev_link_t *snd_pdacf_attach(void)
+static int snd_pdacf_attach(struct pcmcia_device *p_dev)
{
- client_reg_t client_reg; /* Register with cardmgr */
- dev_link_t *link; /* Info for cardmgr */
- int i, ret;
+ int i;
+ dev_link_t *link; /* Info for cardmgr */
struct snd_pdacf *pdacf;
struct snd_card *card;
static struct snd_device_ops ops = {
@@ -216,21 +212,13 @@ static int snd_pdacf_assign_resources(st
/*
* snd_pdacf_detach - detach callback for cs
*/
-static void snd_pdacf_detach(dev_link_t *link)
+static void snd_pdacf_detach(struct pcmcia_device *p_dev)
{
+ dev_link_t *link = dev_to_instance(p_dev);
struct snd_pdacf *chip = link->priv;
snd_printdd(KERN_DEBUG "pdacf_detach called\n");
- /* Remove the interface data from the linked list */
- {
- dev_link_t **linkp;
- /* Locate device structure */
- for (linkp = &dev_list; *linkp; linkp = &(*linkp)->next)
- if (*linkp == link)
- break;
- if (*linkp)
- *linkp = link->next;
- }
+
if (chip->chip_status & PDAUDIOCF_STAT_IS_CONFIGURED)
snd_pdacf_powerdown(chip);
chip->chip_status |= PDAUDIOCF_STAT_IS_STALE; /* to be sure */
@@ -299,62 +287,51 @@ failed:
pcmcia_release_irq(link->handle, &link->irq);
}
-/*
- * event callback
- */
-static int pdacf_event(event_t event, int priority, event_callback_args_t *args)
+#ifdef CONFIG_PM
+
+static int pdacf_suspend(struct pcmcia_device *dev)
{
- dev_link_t *link = args->client_data;
+ dev_link_t *link = dev_to_instance(dev);
struct snd_pdacf *chip = link->priv;
- switch (event) {
- case CS_EVENT_CARD_REMOVAL:
- snd_printdd(KERN_DEBUG "CARD_REMOVAL..\n");
- link->state &= ~DEV_PRESENT;
- if (link->state & DEV_CONFIG) {
- chip->chip_status |= PDAUDIOCF_STAT_IS_STALE;
- }
- break;
- case CS_EVENT_CARD_INSERTION:
- snd_printdd(KERN_DEBUG "CARD_INSERTION..\n");
- link->state |= DEV_PRESENT;
- pdacf_config(link);
- break;
-#ifdef CONFIG_PM
- case CS_EVENT_PM_SUSPEND:
- snd_printdd(KERN_DEBUG "SUSPEND\n");
- link->state |= DEV_SUSPEND;
+ snd_printdd(KERN_DEBUG "SUSPEND\n");
+ link->state |= DEV_SUSPEND;
+ if (chip) {
+ snd_printdd(KERN_DEBUG "snd_pdacf_suspend calling\n");
+ snd_pdacf_suspend(chip, PMSG_SUSPEND);
+ }
+
+ snd_printdd(KERN_DEBUG "RESET_PHYSICAL\n");
+ if (link->state & DEV_CONFIG)
+ pcmcia_release_configuration(link->handle);
+
+ return 0;
+}
+
+static int pdacf_resume(struct pcmcia_device *dev)
+{
+ dev_link_t *link = dev_to_instance(dev);
+ struct snd_pdacf *chip = link->priv;
+
+ snd_printdd(KERN_DEBUG "RESUME\n");
+ link->state &= ~DEV_SUSPEND;
+
+ snd_printdd(KERN_DEBUG "CARD_RESET\n");
+ if (DEV_OK(link)) {
+ snd_printdd(KERN_DEBUG "requestconfig...\n");
+ pcmcia_request_configuration(link->handle, &link->conf);
if (chip) {
- snd_printdd(KERN_DEBUG "snd_pdacf_suspend calling\n");
- snd_pdacf_suspend(chip, PMSG_SUSPEND);
- }
- /* Fall through... */
- case CS_EVENT_RESET_PHYSICAL:
- snd_printdd(KERN_DEBUG "RESET_PHYSICAL\n");
- if (link->state & DEV_CONFIG)
- pcmcia_release_configuration(link->handle);
- break;
- case CS_EVENT_PM_RESUME:
- snd_printdd(KERN_DEBUG "RESUME\n");
- link->state &= ~DEV_SUSPEND;
- /* Fall through... */
- case CS_EVENT_CARD_RESET:
- snd_printdd(KERN_DEBUG "CARD_RESET\n");
- if (DEV_OK(link)) {
- snd_printdd(KERN_DEBUG "requestconfig...\n");
- pcmcia_request_configuration(link->handle, &link->conf);
- if (chip) {
- snd_printdd(KERN_DEBUG "calling snd_pdacf_resume\n");
- snd_pdacf_resume(chip);
- }
+ snd_printdd(KERN_DEBUG "calling snd_pdacf_resume\n");
+ snd_pdacf_resume(chip);
}
- snd_printdd(KERN_DEBUG "resume done!\n");
- break;
-#endif
}
+ snd_printdd(KERN_DEBUG "resume done!\n");
+
return 0;
}
+#endif
+
/*
* Module entry points
*/
next prev parent reply other threads:[~2005-12-05 20:04 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-05 7:21 2.6.15-rc5-mm1 Andrew Morton
2005-12-05 6:49 ` 2.6.15-rc5-mm1 Carlos Martín
2005-12-06 3:04 ` 2.6.15-rc5-mm1 Andrew Morton
2005-12-06 6:59 ` 2.6.15-rc5-mm1 Ingo Molnar
2005-12-05 19:06 ` 2.6.15-rc5-mm1: git-alsa-vs-git-pcmcia.patch introduces new compile errors Adrian Bunk
2005-12-05 20:05 ` Takashi Iwai [this message]
2005-12-05 21:40 ` 2.6.15-rc5-mm1: USB_IP problems Adrian Bunk
2005-12-07 0:02 ` Greg KH
2005-12-07 0:08 ` Adrian Bunk
2005-12-05 23:05 ` 2.6.15-rc5-mm1 J.A. Magallon
2005-12-05 23:06 ` 2.6.15-rc5-mm1 Randy.Dunlap
2005-12-10 23:36 ` 2.6.15-rc5-mm1 Greg KH
2005-12-10 23:46 ` 2.6.15-rc5-mm1 J.A. Magallon
2005-12-11 21:36 ` 2.6.15-rc5-mm1 J.A. Magallon
2005-12-12 22:58 ` 2.6.15-rc5-mm1 Andrew Morton
2005-12-13 3:44 ` [linux-usb-devel] 2.6.15-rc5-mm1 Alan Stern
2005-12-13 13:51 ` J.A. Magallon
2005-12-13 15:35 ` Alan Stern
2005-12-13 16:47 ` David Brownell
2005-12-06 13:33 ` 2.6.15-rc5-mm1 KAMEZAWA Hiroyuki
2005-12-07 0:46 ` 2.6.15-rc5-mm1 (x86_64-hpet-overflow.patch breaks resume from disk) Rafael J. Wysocki
2005-12-07 23:15 ` Rafael J. Wysocki
2005-12-08 8:43 ` [discuss] " Jan Beulich
2005-12-08 10:53 ` Rafael J. Wysocki
2005-12-08 22:35 ` Rafael J. Wysocki
2005-12-09 9:15 ` Jan Beulich
2005-12-09 9:16 ` Andi Kleen
2005-12-09 11:20 ` Rafael J. Wysocki
2005-12-09 12:41 ` Jan Beulich
2005-12-09 13:10 ` Rafael J. Wysocki
2005-12-09 17:34 ` Rafael J. Wysocki
2005-12-12 7:58 ` Jan Beulich
2005-12-12 8:05 ` [discuss] " Andi Kleen
2005-12-08 22:47 ` Andi Kleen
2005-12-08 23:00 ` Rafael J. Wysocki
2005-12-09 9:08 ` Jan Beulich
2005-12-09 9:16 ` Andi Kleen
2005-12-09 10:57 ` Jan Beulich
2005-12-08 19:09 ` 2.6.15-rc5-mm1 Badari Pulavarty
2005-12-08 21:14 ` 2.6.15-rc5-mm1 James Courtier-Dutton
2005-12-08 23:02 ` 2.6.15-rc5-mm1 Adrian Bunk
2005-12-09 7:15 ` [Alsa-devel] 2.6.15-rc5-mm1 Jaroslav Kysela
2005-12-09 1:09 ` 2.6.15-rc5-mm1 Alexander E. Patrakov
2005-12-09 1:52 ` 2.6.15-rc5-mm1 Jeff Garzik
2005-12-12 16:12 ` 2.6.15-rc5-mm1 Alan Cox
2005-12-13 22:49 ` 2.6.15-rc5-mm1 J.A. Magallon
2005-12-13 23:24 ` 2.6.15-rc5-mm1 Andrew Morton
2005-12-14 0:17 ` 2.6.15-rc5-mm1 J.A. Magallon
2005-12-14 0:22 ` 2.6.15-rc5-mm1 Andrew Morton
2005-12-14 1:33 ` 2.6.15-rc5-mm1 Dmitry Torokhov
2005-12-14 0:31 ` 2.6.15-rc5-mm1 Ben Pfaff
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=s5hwtijl37c.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=akpm@osdl.org \
--cc=bunk@stusta.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®