of: add 'of_' prefix to machine_is_compatible()

machine is compatible is an OF-specific call.  It should have
the of_ prefix to protect the global namespace.

Signed-off-by: Grant Likely <[email protected]>
Acked-by: Michal Simek <[email protected]>
This commit is contained in:
Grant Likely 2010-02-01 21:34:14 -07:00
commit 71a157e8ed
40 changed files with 142 additions and 142 deletions

View file

@ -751,8 +751,8 @@ static void snd_pmac_awacs_suspend(struct snd_pmac *chip)
static void snd_pmac_awacs_resume(struct snd_pmac *chip)
{
if (machine_is_compatible("PowerBook3,1")
|| machine_is_compatible("PowerBook3,2")) {
if (of_machine_is_compatible("PowerBook3,1")
|| of_machine_is_compatible("PowerBook3,2")) {
msleep(100);
snd_pmac_awacs_write_reg(chip, 1,
chip->awacs_reg[1] & ~MASK_PAROUT);
@ -780,16 +780,16 @@ static void snd_pmac_awacs_resume(struct snd_pmac *chip)
}
#endif /* CONFIG_PM */
#define IS_PM7500 (machine_is_compatible("AAPL,7500") \
|| machine_is_compatible("AAPL,8500") \
|| machine_is_compatible("AAPL,9500"))
#define IS_PM5500 (machine_is_compatible("AAPL,e411"))
#define IS_BEIGE (machine_is_compatible("AAPL,Gossamer"))
#define IS_IMAC1 (machine_is_compatible("PowerMac2,1"))
#define IS_IMAC2 (machine_is_compatible("PowerMac2,2") \
|| machine_is_compatible("PowerMac4,1"))
#define IS_G4AGP (machine_is_compatible("PowerMac3,1"))
#define IS_LOMBARD (machine_is_compatible("PowerBook1,1"))
#define IS_PM7500 (of_machine_is_compatible("AAPL,7500") \
|| of_machine_is_compatible("AAPL,8500") \
|| of_machine_is_compatible("AAPL,9500"))
#define IS_PM5500 (of_machine_is_compatible("AAPL,e411"))
#define IS_BEIGE (of_machine_is_compatible("AAPL,Gossamer"))
#define IS_IMAC1 (of_machine_is_compatible("PowerMac2,1"))
#define IS_IMAC2 (of_machine_is_compatible("PowerMac2,2") \
|| of_machine_is_compatible("PowerMac4,1"))
#define IS_G4AGP (of_machine_is_compatible("PowerMac3,1"))
#define IS_LOMBARD (of_machine_is_compatible("PowerBook1,1"))
static int imac1, imac2;

View file

@ -582,7 +582,7 @@ static int snd_pmac_burgundy_detect_headphone(struct snd_pmac *chip)
static void snd_pmac_burgundy_update_automute(struct snd_pmac *chip, int do_notify)
{
if (chip->auto_mute) {
int imac = machine_is_compatible("iMac");
int imac = of_machine_is_compatible("iMac");
int reg, oreg;
reg = oreg = snd_pmac_burgundy_rcb(chip,
MASK_ADDR_BURGUNDY_MORE_OUTPUTENABLES);
@ -620,7 +620,7 @@ static void snd_pmac_burgundy_update_automute(struct snd_pmac *chip, int do_noti
*/
int __devinit snd_pmac_burgundy_init(struct snd_pmac *chip)
{
int imac = machine_is_compatible("iMac");
int imac = of_machine_is_compatible("iMac");
int i, err;
/* Checks to see the chip is alive and kicking */

View file

@ -922,11 +922,11 @@ static void __devinit detect_byte_swap(struct snd_pmac *chip)
}
/* it seems the Pismo & iBook can't byte-swap in hardware. */
if (machine_is_compatible("PowerBook3,1") ||
machine_is_compatible("PowerBook2,1"))
if (of_machine_is_compatible("PowerBook3,1") ||
of_machine_is_compatible("PowerBook2,1"))
chip->can_byte_swap = 0 ;
if (machine_is_compatible("PowerBook2,1"))
if (of_machine_is_compatible("PowerBook2,1"))
chip->can_duplex = 0;
}
@ -959,11 +959,11 @@ static int __devinit snd_pmac_detect(struct snd_pmac *chip)
chip->control_mask = MASK_IEPC | MASK_IEE | 0x11; /* default */
/* check machine type */
if (machine_is_compatible("AAPL,3400/2400")
|| machine_is_compatible("AAPL,3500"))
if (of_machine_is_compatible("AAPL,3400/2400")
|| of_machine_is_compatible("AAPL,3500"))
chip->is_pbook_3400 = 1;
else if (machine_is_compatible("PowerBook1,1")
|| machine_is_compatible("AAPL,PowerBook1998"))
else if (of_machine_is_compatible("PowerBook1,1")
|| of_machine_is_compatible("AAPL,PowerBook1998"))
chip->is_pbook_G3 = 1;
chip->node = of_find_node_by_name(NULL, "awacs");
sound = of_node_get(chip->node);
@ -1033,8 +1033,8 @@ static int __devinit snd_pmac_detect(struct snd_pmac *chip)
}
if (of_device_is_compatible(sound, "tumbler")) {
chip->model = PMAC_TUMBLER;
chip->can_capture = machine_is_compatible("PowerMac4,2")
|| machine_is_compatible("PowerBook4,1");
chip->can_capture = of_machine_is_compatible("PowerMac4,2")
|| of_machine_is_compatible("PowerBook4,1");
chip->can_duplex = 0;
// chip->can_byte_swap = 0; /* FIXME: check this */
chip->num_freqs = ARRAY_SIZE(tumbler_freqs);