Permalink
Browse files

fix logic for vga_switcheroo_register_client() signature tests

  • Loading branch information...
1 parent eca97b9 commit 2e00cd4bdf77b9ccfa56b53b0a6a9c60540ce32b @mharsch mharsch committed Jul 30, 2012
Showing with 8 additions and 1 deletion.
  1. +6 −0 pscnv/kapitest/switcheroo_ops.c
  2. +2 −1 pscnv/kapitest/switcheroo_reprobe.c
@@ -4,6 +4,12 @@
void dummy(struct drm_device *dev)
{
+ /*
+ * kernel 3.5 added the vga_switcheroo_client_ops struct to replace
+ * the 3 separate args to vga_switcheroo_register_client() bringing
+ * the total arg count down to 2
+ */
+
static const struct vga_switcheroo_client_ops foo_switcheroo_ops = {
.set_gpu_state = NULL,
.reprobe = NULL,
@@ -4,5 +4,6 @@
void dummy(struct drm_device *dev)
{
- vga_switcheroo_register_client(dev->pdev, 0, 0);
+ /* reprobe arg was added in 2.6.38 for a total of 4 args */
+ vga_switcheroo_register_client(dev->pdev, 0, 0, 0);
}

0 comments on commit 2e00cd4

Please sign in to comment.