Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Jan 30th, 2010 | Syntax: C | Size: 0.90 KB | Hits: 69 | Expires: Never
Copy text to clipboard
  1. static int msm_fb_pm_vid_en(int on)
  2. {
  3.         int rc = 0;
  4.         struct msm_fb_pm_vid_en_req {
  5.                 struct rpc_request_hdr hdr;
  6.                 uint32_t on;
  7.         } req;
  8.  
  9.         pm_vid_en_ep = msm_rpc_connect(PM_VID_EN_API_PROG,
  10.                                         PM_VID_EN_API_VERS, 0);
  11.         if (IS_ERR(pm_vid_en_ep)) {
  12.                 printk(KERN_ERR "%s: msm_rpc_connect failed! rc = %ld\n",
  13.                         __func__, PTR_ERR(pm_vid_en_ep));
  14.                 return -EINVAL;
  15.         }
  16.  
  17.         req.on = cpu_to_be32(on);
  18.         rc = msm_rpc_call(pm_vid_en_ep,
  19.                         PM_VID_EN_CONFIG_PROC,
  20.                         &req, sizeof(req),
  21.                         5 * HZ);
  22.         if (rc)
  23.                 printk(KERN_ERR
  24.                         "%s: msm_rpc_call failed! rc = %d\n", __func__, rc);
  25.  
  26.         msm_rpc_close(pm_vid_en_ep);
  27.         return rc;
  28. }