Which of the following is a correct equation for the line passing through the point (-2,1) and having slope m = 1/2?

a: y=1/2x+2
b: y=-2x+1/2
c: x-2y=-4
d: y-1=1/2(x+2)