[PATCH] ppc32: Remove CONFIG_PMAC_PBOOK
This patch removes CONFIG_PMAC_PBOOK (PowerBook support). This is now split into CONFIG_PMAC_MEDIABAY for the actual hotswap bay that some powerbooks have, CONFIG_PM for power management related code, and just left out of any CONFIG_* option for some generally useful stuff that can be used on non-laptops as well. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Esse commit está contido em:

commit de
Linus Torvalds

pai
fcd16cc084
commit
8c8709334c
@@ -255,7 +255,7 @@ static int awacs_burgundy_read_mvolume(unsigned address);
|
||||
|
||||
static volatile struct dbdma_cmd *emergency_dbdma_cmd;
|
||||
|
||||
#ifdef CONFIG_PMAC_PBOOK
|
||||
#ifdef CONFIG_PM
|
||||
/*
|
||||
* Stuff for restoring after a sleep.
|
||||
*/
|
||||
@@ -263,7 +263,7 @@ static int awacs_sleep_notify(struct pmu_sleep_notifier *self, int when);
|
||||
struct pmu_sleep_notifier awacs_sleep_notifier = {
|
||||
awacs_sleep_notify, SLEEP_LEVEL_SOUND,
|
||||
};
|
||||
#endif /* CONFIG_PMAC_PBOOK */
|
||||
#endif /* CONFIG_PM */
|
||||
|
||||
/* for (soft) sample rate translations */
|
||||
int expand_bal; /* Balance factor for expanding (not volume!) */
|
||||
@@ -675,7 +675,7 @@ static void PMacIrqCleanup(void)
|
||||
kfree(awacs_rx_cmd_space);
|
||||
kfree(beep_dbdma_cmd_space);
|
||||
kfree(beep_buf);
|
||||
#ifdef CONFIG_PMAC_PBOOK
|
||||
#ifdef CONFIG_PM
|
||||
pmu_unregister_sleep_notifier(&awacs_sleep_notifier);
|
||||
#endif
|
||||
}
|
||||
@@ -1415,7 +1415,7 @@ load_awacs(void)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PMAC_PBOOK
|
||||
#ifdef CONFIG_PM
|
||||
/*
|
||||
* Save state when going to sleep, restore it afterwards.
|
||||
*/
|
||||
@@ -1551,7 +1551,7 @@ static int awacs_sleep_notify(struct pmu_sleep_notifier *self, int when)
|
||||
}
|
||||
return PBOOK_SLEEP_OK;
|
||||
}
|
||||
#endif /* CONFIG_PMAC_PBOOK */
|
||||
#endif /* CONFIG_PM */
|
||||
|
||||
|
||||
/* All the burgundy functions: */
|
||||
@@ -3053,9 +3053,9 @@ printk("dmasound_pmac: Awacs/Screamer Codec Mfct: %d Rev %d\n", mfg, rev);
|
||||
if ((res=setup_beep()))
|
||||
return res ;
|
||||
|
||||
#ifdef CONFIG_PMAC_PBOOK
|
||||
#ifdef CONFIG_PM
|
||||
pmu_register_sleep_notifier(&awacs_sleep_notifier);
|
||||
#endif /* CONFIG_PMAC_PBOOK */
|
||||
#endif /* CONFIG_PM */
|
||||
|
||||
/* Powerbooks have odd ways of enabling inputs such as
|
||||
an expansion-bay CD or sound from an internal modem
|
||||
|
@@ -90,7 +90,7 @@ snd_pmac_awacs_write_noreg(pmac_t *chip, int reg, int val)
|
||||
snd_pmac_awacs_write(chip, val | (reg << 12));
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PMAC_PBOOK
|
||||
#ifdef CONFIG_PM
|
||||
/* Recalibrate chip */
|
||||
static void screamer_recalibrate(pmac_t *chip)
|
||||
{
|
||||
@@ -642,7 +642,7 @@ static void awacs_restore_all_regs(pmac_t *chip)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PMAC_PBOOK
|
||||
#ifdef CONFIG_PM
|
||||
static void snd_pmac_awacs_suspend(pmac_t *chip)
|
||||
{
|
||||
snd_pmac_awacs_write_noreg(chip, 1, (chip->awacs_reg[1]
|
||||
@@ -676,7 +676,7 @@ static void snd_pmac_awacs_resume(pmac_t *chip)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif /* CONFIG_PMAC_PBOOK */
|
||||
#endif /* CONFIG_PM */
|
||||
|
||||
#ifdef PMAC_SUPPORT_AUTOMUTE
|
||||
/*
|
||||
@@ -883,7 +883,7 @@ snd_pmac_awacs_init(pmac_t *chip)
|
||||
* set lowlevel callbacks
|
||||
*/
|
||||
chip->set_format = snd_pmac_awacs_set_format;
|
||||
#ifdef CONFIG_PMAC_PBOOK
|
||||
#ifdef CONFIG_PM
|
||||
chip->suspend = snd_pmac_awacs_suspend;
|
||||
chip->resume = snd_pmac_awacs_resume;
|
||||
#endif
|
||||
|
@@ -218,7 +218,7 @@ static snd_kcontrol_new_t daca_mixers[] = {
|
||||
};
|
||||
|
||||
|
||||
#ifdef CONFIG_PMAC_PBOOK
|
||||
#ifdef CONFIG_PM
|
||||
static void daca_resume(pmac_t *chip)
|
||||
{
|
||||
pmac_daca_t *mix = chip->mixer_data;
|
||||
@@ -227,7 +227,7 @@ static void daca_resume(pmac_t *chip)
|
||||
mix->amp_on ? 0x05 : 0x04);
|
||||
daca_set_volume(mix);
|
||||
}
|
||||
#endif /* CONFIG_PMAC_PBOOK */
|
||||
#endif /* CONFIG_PM */
|
||||
|
||||
|
||||
static void daca_cleanup(pmac_t *chip)
|
||||
@@ -275,7 +275,7 @@ int __init snd_pmac_daca_init(pmac_t *chip)
|
||||
return err;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PMAC_PBOOK
|
||||
#ifdef CONFIG_PM
|
||||
chip->resume = daca_resume;
|
||||
#endif
|
||||
|
||||
|
@@ -36,7 +36,7 @@
|
||||
#include <asm/pci-bridge.h>
|
||||
|
||||
|
||||
#if defined(CONFIG_PM) && defined(CONFIG_PMAC_PBOOK)
|
||||
#ifdef CONFIG_PM
|
||||
static int snd_pmac_register_sleep_notifier(pmac_t *chip);
|
||||
static int snd_pmac_unregister_sleep_notifier(pmac_t *chip);
|
||||
static int snd_pmac_suspend(snd_card_t *card, pm_message_t state);
|
||||
@@ -782,7 +782,7 @@ static int snd_pmac_free(pmac_t *chip)
|
||||
}
|
||||
|
||||
snd_pmac_sound_feature(chip, 0);
|
||||
#if defined(CONFIG_PM) && defined(CONFIG_PMAC_PBOOK)
|
||||
#ifdef CONFIG_PM
|
||||
snd_pmac_unregister_sleep_notifier(chip);
|
||||
#endif
|
||||
|
||||
@@ -1292,7 +1292,7 @@ int __init snd_pmac_new(snd_card_t *card, pmac_t **chip_return)
|
||||
/* Reset dbdma channels */
|
||||
snd_pmac_dbdma_reset(chip);
|
||||
|
||||
#if defined(CONFIG_PM) && defined(CONFIG_PMAC_PBOOK)
|
||||
#ifdef CONFIG_PM
|
||||
/* add sleep notifier */
|
||||
if (! snd_pmac_register_sleep_notifier(chip))
|
||||
snd_card_set_pm_callback(chip->card, snd_pmac_suspend, snd_pmac_resume, chip);
|
||||
@@ -1316,7 +1316,7 @@ int __init snd_pmac_new(snd_card_t *card, pmac_t **chip_return)
|
||||
* sleep notify for powerbook
|
||||
*/
|
||||
|
||||
#if defined(CONFIG_PM) && defined(CONFIG_PMAC_PBOOK)
|
||||
#ifdef CONFIG_PM
|
||||
|
||||
/*
|
||||
* Save state when going to sleep, restore it afterwards.
|
||||
@@ -1414,4 +1414,5 @@ static int snd_pmac_unregister_sleep_notifier(pmac_t *chip)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_PM && CONFIG_PMAC_PBOOK */
|
||||
#endif /* CONFIG_PM */
|
||||
|
||||
|
@@ -167,7 +167,7 @@ struct snd_pmac {
|
||||
void (*set_format)(pmac_t *chip);
|
||||
void (*update_automute)(pmac_t *chip, int do_notify);
|
||||
int (*detect_headphone)(pmac_t *chip);
|
||||
#ifdef CONFIG_PMAC_PBOOK
|
||||
#ifdef CONFIG_PM
|
||||
void (*suspend)(pmac_t *chip);
|
||||
void (*resume)(pmac_t *chip);
|
||||
#endif
|
||||
|
@@ -1128,7 +1128,7 @@ static void tumbler_reset_audio(pmac_t *chip)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PMAC_PBOOK
|
||||
#ifdef CONFIG_PM
|
||||
/* suspend mixer */
|
||||
static void tumbler_suspend(pmac_t *chip)
|
||||
{
|
||||
@@ -1370,7 +1370,7 @@ int __init snd_pmac_tumbler_init(pmac_t *chip)
|
||||
if ((err = snd_ctl_add(chip->card, chip->drc_sw_ctl)) < 0)
|
||||
return err;
|
||||
|
||||
#ifdef CONFIG_PMAC_PBOOK
|
||||
#ifdef CONFIG_PM
|
||||
chip->suspend = tumbler_suspend;
|
||||
chip->resume = tumbler_resume;
|
||||
#endif
|
||||
|
Referência em uma nova issue
Block a user