summaryrefslogtreecommitdiffstats
path: root/drivers/macintosh
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/macintosh')
-rw-r--r--drivers/macintosh/via-pmu.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c
index 433dbeddfcf9..a3b6a4a703ab 100644
--- a/drivers/macintosh/via-pmu.c
+++ b/drivers/macintosh/via-pmu.c
@@ -274,7 +274,7 @@ int __init find_via_pmu(void)
u64 taddr;
const u32 *reg;
- if (via != 0)
+ if (via)
return 1;
vias = of_find_node_by_name(NULL, "via-pmu");
if (vias == NULL)
@@ -1152,7 +1152,7 @@ pmu_queue_request(struct adb_request *req)
req->complete = 0;
spin_lock_irqsave(&pmu_lock, flags);
- if (current_req != 0) {
+ if (current_req) {
last_req->next = req;
last_req = req;
} else {
@@ -1227,7 +1227,7 @@ pmu_start(void)
/* assert pmu_state == idle */
/* get the packet to send */
req = current_req;
- if (req == 0 || pmu_state != idle
+ if (!req || pmu_state != idle
|| (/*req->reply_expected && */req_awaiting_reply))
return;
@@ -1382,7 +1382,7 @@ next:
if ((1 << pirq) & PMU_INT_ADB) {
if ((data[0] & PMU_INT_ADB_AUTO) == 0) {
struct adb_request *req = req_awaiting_reply;
- if (req == 0) {
+ if (!req) {
printk(KERN_ERR "PMU: extra ADB reply\n");
return;
}
@@ -1749,7 +1749,7 @@ pmu_shutdown(void)
int
pmu_present(void)
{
- return via != 0;
+ return via != NULL;
}
#if defined(CONFIG_SUSPEND) && defined(CONFIG_PPC32)
@@ -2081,7 +2081,7 @@ pmu_open(struct inode *inode, struct file *file)
unsigned long flags;
pp = kmalloc(sizeof(struct pmu_private), GFP_KERNEL);
- if (pp == 0)
+ if (!pp)
return -ENOMEM;
pp->rb_get = pp->rb_put = 0;
spin_lock_init(&pp->lock);
@@ -2107,7 +2107,7 @@ pmu_read(struct file *file, char __user *buf,
unsigned long flags;
int ret = 0;
- if (count < 1 || pp == 0)
+ if (count < 1 || !pp)
return -EINVAL;
if (!access_ok(VERIFY_WRITE, buf, count))
return -EFAULT;
@@ -2164,7 +2164,7 @@ pmu_fpoll(struct file *filp, poll_table *wait)
__poll_t mask = 0;
unsigned long flags;
- if (pp == 0)
+ if (!pp)
return 0;
poll_wait(filp, &pp->wait, wait);
spin_lock_irqsave(&pp->lock, flags);
@@ -2180,7 +2180,7 @@ pmu_release(struct inode *inode, struct file *file)
struct pmu_private *pp = file->private_data;
unsigned long flags;
- if (pp != 0) {
+ if (pp) {
file->private_data = NULL;
spin_lock_irqsave(&all_pvt_lock, flags);
list_del(&pp->list);