Skip to content

Commit

Permalink
Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart
Browse files Browse the repository at this point in the history
* master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart:
  [AGPGART] alpha-agp warning fix
  [AGPGART] uninorth-agp warning fixes
  [AGPGART] Remove pointless initialisation in intel-agp
  [AGPGART] Remove pointless code from agp_generic_create_gatt_table()
  • Loading branch information
Linus Torvalds committed Jun 20, 2006
2 parents bbf7013 + 81c2466 commit bfd189a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 14 deletions.
15 changes: 7 additions & 8 deletions drivers/char/agp/alpha-agp.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@ struct vm_operations_struct alpha_core_agp_vm_ops = {
};


static int alpha_core_agp_nop(void)
{
/* just return success */
return 0;
}

static int alpha_core_agp_fetch_size(void)
{
return alpha_core_agp_sizes[0].size;
Expand Down Expand Up @@ -120,6 +114,11 @@ static int alpha_core_agp_remove_memory(struct agp_memory *mem, off_t pg_start,
return status;
}

static int alpha_core_agp_create_free_gatt_table(struct agp_bridge_data *a)
{
return 0;
}

struct agp_bridge_driver alpha_core_agp_driver = {
.owner = THIS_MODULE,
.aperture_sizes = alpha_core_agp_sizes,
Expand All @@ -135,8 +134,8 @@ struct agp_bridge_driver alpha_core_agp_driver = {
.tlb_flush = alpha_core_agp_tlbflush,
.mask_memory = agp_generic_mask_memory,
.cache_flush = global_cache_flush,
.create_gatt_table = alpha_core_agp_nop,
.free_gatt_table = alpha_core_agp_nop,
.create_gatt_table = alpha_core_agp_create_free_gatt_table,
.free_gatt_table = alpha_core_agp_create_free_gatt_table,
.insert_memory = alpha_core_agp_insert_memory,
.remove_memory = alpha_core_agp_remove_memory,
.alloc_by_type = agp_generic_alloc_by_type,
Expand Down
4 changes: 1 addition & 3 deletions drivers/char/agp/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -809,12 +809,10 @@ int agp_generic_create_gatt_table(struct agp_bridge_data *bridge)
case U32_APER_SIZE:
bridge->current_size = A_IDX32(bridge);
break;
/* This case will never really happen. */
/* These cases will never really happen. */
case FIXED_APER_SIZE:
case LVL2_APER_SIZE:
default:
bridge->current_size =
bridge->current_size;
break;
}
temp = bridge->current_size;
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/agp/intel-agp.c
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ static int intel_i915_remove_entries(struct agp_memory *mem,off_t pg_start,
static int intel_i915_fetch_size(void)
{
struct aper_size_info_fixed *values;
u32 temp, offset = 0;
u32 temp, offset;

#define I915_256MB_ADDRESS_MASK (1<<27)

Expand Down
4 changes: 2 additions & 2 deletions drivers/char/agp/uninorth-agp.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ static int agp_uninorth_suspend(struct pci_dev *pdev)
/* turn off AGP on the bridge */
agp = pci_find_capability(pdev, PCI_CAP_ID_AGP);
pci_read_config_dword(pdev, agp + PCI_AGP_COMMAND, &cmd);
bridge->dev_private_data = (void *)cmd;
bridge->dev_private_data = (void *)(long)cmd;
if (cmd & PCI_AGP_COMMAND_AGP) {
printk("uninorth-agp: disabling AGP on bridge %s\n",
pci_name(pdev));
Expand All @@ -351,7 +351,7 @@ static int agp_uninorth_resume(struct pci_dev *pdev)
if (bridge == NULL)
return -ENODEV;

command = (u32)bridge->dev_private_data;
command = (long)bridge->dev_private_data;
bridge->dev_private_data = NULL;
if (!(command & PCI_AGP_COMMAND_AGP))
return 0;
Expand Down

0 comments on commit bfd189a

Please sign in to comment.